The SAS Output Delivery System and reporting techniques

How to print picture in a header and footnote with ods pdf

Reply
Contributor
Posts: 36

How to print picture in a header and footnote with ods pdf

Hi,
I use the following macro to print an image in the header of a pdf document wich contains a footnote too :

%Macro LogoFooterPdf(MyLogoFile, MyFooter1, MyFooter2) / store;
%let MyLogoFile=%BQUOTE(%STR(&MyLogoFile));
%let MyFooter1=%BQUOTE(%STR(&MyFooter1));
%let MyFooter2=%BQUOTE(%STR(&MyFooter2));

ods escapechar='^';

title "^S={just=left preimage='&MyLogoFile'}";

footnote1 "^S={just=left font_size=8pt font_weight=light font_style=roman} &MyFooter1";
footnote2 "^S={just=right font_size=8pt font_weight=light font_style=roman} &MyFooter2";
%Mend;

I call the macro with the following code :

dm log 'clear';
OPTION mlogic symbolgen;
OPTION nodate nonumber;
ods listing close;
ods noproctitle;
ods PDF file='H:\TestOds.pdf' startpage=never;
%LogoFooterPdf(H:\logo.jpg, PROJET, Page ^{thispage} of ^{lastpage});
proc print DATA=sashelp.class; run;

ods PDF close;
ods listing;

The footnotes appear correctly but not the picture.
If I don't make the footnotes appear then the picture can be seen.

If someone knows how to print both picture in the header and the footnotes it would be great.

Thanks ! Message was edited by: phil27
SAS Super FREQ
Posts: 8,743

Re: How to print picture in a header and footnote with ods pdf

Hi:
I see that you are trying to insert your image -and- the program is using ESCAPECHAR + {thispage}/{lastpage}.

I think that's the issue. This Tech Support note outlines a problem:
http://support.sas.com/kb/34/573.html

I believe this issue does not only apply to SAS/GRAPH images, but also applies to images such as logos. You might want to check with Tech Support to see whether there's any workaround other than taking out the page numbering. As you can see this was reported for SAS 9.1.3, but does not have a "fix" version yet.

cynthia
Contributor
Posts: 36

Re: How to print picture in a header and footnote with ods pdf

Hi,
Ok, Thanks Cynthia.

Phil. Message was edited by: phil27
Ask a Question
Discussion stats
  • 2 replies
  • 139 views
  • 0 likes
  • 2 in conversation