BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SASGeek
Obsidian | Level 7

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;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

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;

Ksharp_0-1669602492308.png

 

View solution in original post

1 REPLY 1
Ksharp
Super User

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;

Ksharp_0-1669602492308.png

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 483 views
  • 0 likes
  • 2 in conversation