rtf to pdf conversion using sas EG in linux

Reply
Occasional Contributor
Posts: 11

rtf to pdf conversion using sas EG in linux

Hi, 

 

I would like to know, is there any data _null_ sas code to convert rtf file to pdf in SAS EG in linux environment.

 

Thanks in advance.

Super User
Posts: 19,023

Re: rtf to pdf conversion using sas EG in linux

Is SAS generating the RTF file?

 

EG doesn't usually allow you to pass commands to the OS, so do you have X commands enabled? 

Occasional Contributor
Posts: 11

Re: rtf to pdf conversion using sas EG in linux

[ Edited ]

Hi Reeza,

 

Yes,RTF file is getting generated.how can we know, whether x commands is enabled?

Super User
Posts: 19,023

Re: rtf to pdf conversion using sas EG in linux

If the RTF file is generated from SAS, why not switch on PDF output as well instead of converting?

 

XCMD means it's enabled.

NOXCMD means its not enabled.

 

proc options; run;

If you haven't changed it, it's off by default. Only your system administrator will be able to turn it on, you can't control that option.

Super User
Posts: 7,386

Re: rtf to pdf conversion using sas EG in linux


skg74_mail_umkc_edu wrote:

Hi Reeza,

 

Yes,RTF file is getting generated.how can we know, whether x commands is enabled?


If the RTF is created from SAS, then just change ODS RTF to ODS PDF.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 11,104

Re: rtf to pdf conversion using sas EG in linux


KurtBremser wrote:

skg74_mail_umkc_edu wrote:

Hi Reeza,

 

Yes,RTF file is getting generated.how can we know, whether x commands is enabled?


If the RTF is created from SAS, then just change ODS RTF to ODS PDF.


Of if you want both versions use two ods statements:

 

ods pdf file="filename.pdf";

od rtf file="filename.rtf";

<output generation goes here>

ods rtf close;

ods pdf close;

Super User
Super User
Posts: 7,682

Re: rtf to pdf conversion using sas EG in linux

One other option you have, Adobe when installed, can have a folder which it routinely scans for files and converts anything it finds in there.  You could save your RTF there and it would pick it up and create the PDF.  However be aware that your limited in the fact you can't do anything mcuh with that process unless you know all the workings of Adobe.  

If your doing a large document and need bookmarks or anything fancy, then you may be better off looking at Word scripting (VBA) to load RTF files and create the document as you want.  In SAS you may not have command line access, and so far I have found the proc document and such like to be well below par in terms of usability.

Ask a Question
Discussion stats
  • 6 replies
  • 162 views
  • 0 likes
  • 5 in conversation