BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi all,

Is there any easy way using SAS to convert RTF file in a PDF file. Sorry if it is a silly question, but I have never used it before!

Many thanks,
4 REPLIES 4
deleted_user
Not applicable
Hmmm,

steam hammers to crack walnuts comes to mind

RTF is a particular file format with data embedded in formatting codes certain other applications will understand. PDF is another file format using other formatting codes, and there is no easy translation of which I am aware.

Conceptually you could hand craft something to surgically excise and interpret the RTF codes and reinsert PDF codes back into the data stream, but this is neither easy nor necessarily an easy task.

There are multiple helper applications about that will take a Word document and produce a PDF file, including the early versions of MS Office 2007. Since Word recognises and handles RTF files as if they were native word files, this is the path I would take.


If you use a SAS session to create an RTF file, then it seems to me it might be easier to create a PDF file at the same time by also opening a PDF destination in ODS.

Kind regards

David
deleted_user
Not applicable
I have already try to create a PDF file at the same time I create the RTF file. But the problem is I use RTF control words, and so I can't directly use the PDF destination.
If there is no way using directly the SAS system, maybe I would use Acrobat Distiller (even if I would prefer do it using SAS)?
Cynthia_sas
SAS Super FREQ
Hi,
David is right. If you are using RTF control strings in SAS to create your RTF file, then your best bet might be to use Acrobat Distiller or some Word plug-in to turn the RTF file into a PDF file.

Depending on what your RTF control strings are doing, you may be able to send them to the RTF destination ONLY by using RAW text strings with ODS ESCAPECHAR. But, if you want the PDF file to look like the RTF file -- then you have to go down the 3rd party software road.

In 9.2, you will be able to use the text-decoration style attributes to perform some of the underlining, etc in PDF and RTF without using control strings. But until then....you're left to converting your RTF file to PDF using other (non-SAS) methods.

cynthia
Tim_SAS
Barite | Level 11
OpenOffice.org's Writer can read RTF files and export directly to PDF. It's not an automatic solution, but it's free.

http:://www.openoffice.org

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1216 views
  • 0 likes
  • 3 in conversation