I'm writing several tables to a PDF file and trying to get several on one page.
When I use the startpage=never or no options the titles don't get printed anymore in the document.
So a workaround is using ODS PDF Text= instead.
Is there a way to either
1. get the titles working in the output
2. Style the ODS PDF Text (ie Center, enlarge, add padding).
Thanks!
Hi:
As far as Printer Family destinations, like PDF, a SAS title goes at the TOP of the page. When you turn off the page break command between procedures (such as when you use STARTPAGE=), then the second procedure (or subsequent procedures) does/do NOT have a top of page. So you must use ODS TEXT to insert text that you want, in place of a title.
There are a couple of different ways to style the ODS TEXT string. One is with ODS ESCAPECHAR and the other is with a custom style template and both methods are illustrated in this note:
8044 - The TEXT= option in the ODS PRINTER/RTF statement is always left justified
cynthia
Hi:
As far as Printer Family destinations, like PDF, a SAS title goes at the TOP of the page. When you turn off the page break command between procedures (such as when you use STARTPAGE=), then the second procedure (or subsequent procedures) does/do NOT have a top of page. So you must use ODS TEXT to insert text that you want, in place of a title.
There are a couple of different ways to style the ODS TEXT string. One is with ODS ESCAPECHAR and the other is with a custom style template and both methods are illustrated in this note:
8044 - The TEXT= option in the ODS PRINTER/RTF statement is always left justified
cynthia
Thanks Cynthia.
Is there a way to specify a header and footer in a PDF file across all pages? I have multiple tables going to the same page and sometimes they spill over to 2 or 3 pages, but I need the same header or footer on each page.
Hi:
When I run the code below, using SAS 9.3, the SAS TITLE and FOOTNOTE statements specified at the beginning will repeat on all the pages of the output. However, I would expect that if you put different TITLE statements between your procedure steps you will get variable results with STARTPAGE=NO. But in the simplest usage, I do have the same title and footnote repeating across all pages.
cynthia
ods _all_ close;
ods pdf file='c:\temp\testtitle.pdf'
startpage=no;
title 'Main Title';
footnote 'Main Footnote';
proc print data=sashelp.class;
run;
ods text= 'something1';
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
ods text= 'something2';
proc print data=sashelp.shoes(obs=50);
run;
ods text='something3';
ods pdf close;
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 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: