BookmarkSubscribeRSS Feed
texasmfp
Lapis Lazuli | Level 10

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

5 REPLIES 5
Reeza
Super User

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:

https://documentation.sas.com/?docsetId=odsug&docsetTarget=p14qidvs5xf7omn14ommvsuhvmzn.htm&docsetVe...

 

 

 


@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


 

texasmfp
Lapis Lazuli | Level 10

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?

SASKiwi
PROC Star

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.

texasmfp
Lapis Lazuli | Level 10

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

Reeza
Super User
Unfortunately AFAIK there isn't a style for PDF that mimics the full listing output. Minimal or Journal will get you the closest to that type of output.

Personally, I prefer meadow or seaside for my reports.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 5 replies
  • 742 views
  • 0 likes
  • 3 in conversation