The SAS Output Delivery System and reporting techniques

RTF (with graphs) to PDF conversion

Occasional Contributor
Posts: 6

RTF (with graphs) to PDF conversion

[ Edited ]



I am trying to convert  RTF file which contains graphs created by SAS 9.4  to  PDF , but after conversion it seems there are issues e.g. dotted lines seems to be solid. (before it was fine). Actually I tried to change version of EMF to older version using code and it works. But it is strange because during outputting the graphs into RTF I haven't changed outputfm from STATIC.


Thank you.

Best regards.

Posts: 9,251

Re: RTF (with graphs) to PDF conversion

You might want to open a track with Tech Support on this, they can look at your code and your graph settings and make suggestions.

I am confused by your statement that you are converting from RTF to PDF -- I assume that means you are doing that in Word by opening the RTF file and then manually or programmatically saving the RTF file as PDF. In this case, the conversion that is happening is a Microsoft-controlled conversion. Once SAS makes the RTF file, it is not involved in the conversion from RTF to PDF.

On the other hand if you have an ODS "sandwich" that is directly making the PDF file:
ODS PDF file="xxx.pdf";
** graph and other code;

and you have issues THEN, you could argue that SAS was responsible for how the image was converted from internal SAS format to PDF format.

But when you have an RTF file created with SAS, you are dealing with a file created in RTF format, based on the rules for the RTF format. If you open, and possibly edit that file with Word and then save the file as PDF, THAT conversion is a Microsoft-conversion.

I think Tech Support is your best resource for helping you clarify where the issue is.

Occasional Contributor
Posts: 6

Re: RTF (with graphs) to PDF conversion

Posted in reply to Cynthia_sas

Thank you Cynthia.


Actually I am using batch script  which contains exe file for conversion. For older SAS versions it works  normally. It seems the issue related to Adobe mostly.

Super User
Posts: 12,994

Re: RTF (with graphs) to PDF conversion

Are you running the code used to previously generate an RTF document and only changing the ODS destination to PDF?


The most likely cause of characteristics such as line color or type changing is the style used. ODS PDF and ODS RTF use different ODS style definitions. I would start by adding an a specific style to the PDF destination that matches the one used for RTF.


For any production work I always specify the ODS style for any document because others running my code may default to a different appearance and go down a similar rabbit-hole of "my output doesn't match".

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation