I normally create a report and then Print to PDF from the output window. I am experimenting with having SAS print directly to a pdf using ods pdf file='c:\temp\filename.pdf';
ODS printing is new to me.
However, the pdf created by that step has a completely different style than if I had printed to pdf from the Output window.
Is there an easy way to tell SAS to use the same format as-if I had printed from the Output Window?
Thanks
Which output window are you using? You can use styles to control the ODS PDF output, if you had listing for example then you can't get exactly the same but you can get similar.
If your destination was HTML then it's likely HTMLBlue - you can check your preferences for the exact style to match. However, HTML has some 'features' that are not available in PDF. For example, HTML doesn't have page sizes or 'pages' in the way PDF documents do.
ods pdf file= "path to file.pdf" style=minimal;
The styles are listed here with examples of their table and graphs:
@texasmfp wrote:
I normally create a report and then Print to PDF from the output window. I am experimenting with having SAS print directly to a pdf using ods pdf file='c:\temp\filename.pdf';
ODS printing is new to me.
However, the pdf created by that step has a completely different style than if I had printed to pdf from the Output window.
Is there an easy way to tell SAS to use the same format as-if I had printed from the Output Window?
Thanks
Thanks, output was not to HTML.
I tested every single ODS style and none are even close. I have attached a sample page of my original printout.
Alternatively, is there another way to print a report to pdf than through ODS?
Your original report looks like a SAS LISTING report that is just saved as a PDF. The font looks suspiciously like the SAS Monospace font. Please post your SAS code so we can have a better idea what is happening.
Ahhh!. Yes that is exactly what it is. Sorry, I did not know the "Listing" terminology. Yes, SAS Monospace 8.
Original code, which I simply printed from the output window. Now I know it is the "Listing" window
Is there a way to program that the listing output be printed to a pdf in a specific directory or, am I stuck trying to do it manually or to use a ODS style.
Main goal is to save a few steps while keeping the report looking the same.
Thanks
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.