The SAS Output Delivery System and reporting techniques

Eliminating Page Breaks in ODS PDF

Super Contributor
Posts: 297

Eliminating Page Breaks in ODS PDF

I have a pgm that outputs 4 proc tabulates into one Excel file via ods html file=xl; The beauty of it is that html outputs have no page breaks so that these 4 tables can actually be printed from excel on one page. I'd like to be able to do the same one page arrangement but produce it as a pdf file. PDF is page oriented so the job shows up as 4 pages instead of one. Is there a way to eliminate the page breaks between the proc tabulates?
Posts: 9,365

Re: Eliminating Page Breaks in ODS PDF

Look at the documentation of ODS PDF option STARTPAGE:
ods pdf file='wombat.pdf' startpage=no;

Also, a clarification on something you said:
4 proc tabulates into one Excel file via ods html file=xl;

When you use ODS HTML, you are NOT creating an Excel file. You are only creating an HTML file (with HTML markup tags) that Excel knows how to open and render. If you do this:
ods html file='c:\temp\wombat.xls';

The file extension does not mean that you are creating an Excel file in true, proprietary Excel format. You are fooling the Windows registry into opening Excel when you double click on the icon for the above file. That's because Windows associates Excel with the file extension of .XLS -- if you did something different, call the file
ods html file='c:\temp\wombat2.html';

you would launch a browser when you double-clicked on the icon for this file. However, if you open Excel and do a File--> Open from inside Excel, then Excel would open the HTML file just fine.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation