Hello,
I'm trying to insert a footer on a pdf that consists of a base line followed by the logo, Page X of Y, and run date. I am having a problem with centering the Page X of Y and the run date on the page and aligning the text within the size of the logo (sample below). Here's my code. What can I correct to get what I want?
Thank you
options papersize = (8.5in 11in)
orientation = portrait
leftmargin = .5in
rightmargin = .5in
topmargin = .25in
bottommargin = .25in
nodate
nonumber;
ods escapechar="^";
title;
footnote;
ods pdf file=&pdffile nogtitle notoc startpage = never;
title1 "^{style [just = r
width = 100pct
cellheight = 12pt
font_size = 10pt
color = white
font_face = 'MyFont'
background = &MyBlue.] Data Review}";
title2 "^{style [just = r
width = 100pct
font_size = 9pt
cellheight = 11pt
color = white
fontstyle = italic
font_face = 'MyFont'
background = &MyBlue.] For Production Period: &sysdate().}";
footnote1 "^{style [just = r
width = 100pct
cellheight = 2pt
background = &MyBlue.] }";
footnote2 j = l "^{style [preimage= '/sasdata/MyLogoWhite.png'
font_face= 'MyFont'
font_size = 7pt ] Page ^{thispage} of ^{lastpage} Date run: %sysfunc(today(),mmddyy10.) }";
proc print data = summary (obs = 5); run;
title;
footnote;
ods pdf close;
You want this ?
options papersize = (8.5in 11in)
orientation = portrait
leftmargin = .5in
rightmargin = .5in
topmargin = .25in
bottommargin = .25in
nodate
nonumber;
ods escapechar="^";
title;
footnote;
ods pdf file="c:\temp\temp.pdf" nogtitle notoc startpage = never;
title1 "^{style [just = r
width = 100pct
cellheight = 12pt
font_size = 10pt
color = white] Data Review}";
title2 "^{style [just = r
width = 100pct
font_size = 9pt
cellheight = 11pt
color = white
fontstyle = italic] For Production Period: &sysdate().}";
footnote1 "^{style [just = r
width = 100pct
cellheight = 2pt background=navy] }";
footnote2 j = l "^S={preimage='c:\temp\sas.png'}"
j=c "^S={asis=on vjust=m} Page ^{thispage} of ^{lastpage} ^n Date run: %sysfunc(today(),mmddyy10.) ";
proc print data = sashelp.class (obs = 5); run;
title;
footnote;
ods pdf close;
You want this ?
options papersize = (8.5in 11in)
orientation = portrait
leftmargin = .5in
rightmargin = .5in
topmargin = .25in
bottommargin = .25in
nodate
nonumber;
ods escapechar="^";
title;
footnote;
ods pdf file="c:\temp\temp.pdf" nogtitle notoc startpage = never;
title1 "^{style [just = r
width = 100pct
cellheight = 12pt
font_size = 10pt
color = white] Data Review}";
title2 "^{style [just = r
width = 100pct
font_size = 9pt
cellheight = 11pt
color = white
fontstyle = italic] For Production Period: &sysdate().}";
footnote1 "^{style [just = r
width = 100pct
cellheight = 2pt background=navy] }";
footnote2 j = l "^S={preimage='c:\temp\sas.png'}"
j=c "^S={asis=on vjust=m} Page ^{thispage} of ^{lastpage} ^n Date run: %sysfunc(today(),mmddyy10.) ";
proc print data = sashelp.class (obs = 5); run;
title;
footnote;
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 25. 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.