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

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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