LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 12 Feb 2004 15:25:41 -0500
Reply-To:     Edney.Shawn@EPAMAIL.EPA.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Shawn Edney <Edney.Shawn@EPAMAIL.EPA.GOV>
Subject:      Re: DDE with Adobe Acrobat and Distiller
Content-type: text/plain; charset=US-ASCII

David,

I had a similar situation about a year ago. I did a search on the Adobe web site for command line tools and found several useful webpages. Unfortunately I cannot currently locate the docs I originally found. So let me pass along my strategy and command line. I had SAS write out a .bat file that contained the following command line. In this assignment I used a macro variable "gname" to place the .ps file name into the command. I believe the /N flag causes a new instance of Distiller to be created for each file and the /Q causes Distiller to close automatically after the pdf file is created. I believe I went with this strategy because I couldn't find any way to easily make Distiller close from within SAS after the application was finished. I want to say this kept me from having any issues with the xwait and xsync system options.

comm='"'||"C:\Program Files\Adobe\Acrobat 5.0\Distillr\acrodist"||'" /N /Q '||'"'||"c:\wr2503gs\"||"&gname..ps"||'"';

Using a bat file here was handy because it allowed me to easily rename the short SAS graph file names with longer more descriptive names( with the rename command) and clean up the original .ps files (delete command) and then delete the bat file that was being called.

HTH,

Shawn Edney

Analyst/Programmer CSC 79 T.W. Alexander Drive Bldg. 4201 Suite 260 Research Triangle Park, NC 27709

(919) 558-8782 ext 216 fax 558-8788 edney.shawnRemoveDONTspamMe@epa.gov

David Brennan <brennandavid@PRA To: SAS-L@LISTSERV.UGA.EDU INTL.COM> cc: Sent by: "SAS(r) Subject: DDE with Adobe Acrobat and Distiller Discussion" <SAS-L@LISTSERV.U GA.EDU>

02/12/2004 10:23 AM Please respond to David Brennan

Hi Folks,

I have a query in relation to using DDE with Adobe products, specifically Adobe distiller. Basically, I have a Postscript file which I want to convert and save as a PDF document. Distiller can be started up using the following code:

/*****************************************/ options noxsync noxwait xmin; filename sas2dist dde "AcroDist|system";

/* Start up Adobe Distiller */ data _null_; length fid rc start stop time 8.; fid=fopen('sas2dist','s'); if (fid le 0) then do; rc=system('start AcroDist'); start=datetime(); stop=start+10; do while (fid le 0); fid=fopen('sas2dist','s'); time=datetime(); if (time ge stop) then fid=1; end; end; rc=fclose(fid); run;

/*****************************************/

After using this code I was hoping to use DDE commands like one does when manipulating MS Word and Excel documents. I started off simply and thought something that the following would work where I have a PRN file located on the C drive:

/*****************************************/ data _null_; file sas2dist; put '[FileOpen("' 'c:\test.prn' '"]'; run; /*****************************************/

I referenced the "Acrobat Viewer Interapplication Communication Support On-Line Reference,Technical Note #5165" document on the web which lists many "DDE messages", e.g. [FileOpen()] as shown above.

Does anybody know if you can issue these Adobe messages through SAS? If so, I would greatly appreciate any suggestions.

Regards,

David


Back to: Top of message | Previous page | Main SAS-L page