BookmarkSubscribeRSS Feed
SASdevAnneMarie
Barite | Level 11

Hello Experts,

 

My code for the page number is  :

footnote6 J=Right font =Arial  HEIGHT=8pt '^{thispage}/^{lastpage}';

Bu the result is :

SASdevAnneMarie_0-1648996688685.png

 

Do you know, please, how to improve my code ?

 

Thank you for your help !

 

7 REPLIES 7
ballardw
Super User

Where is your Escapechar defined?

Which ODS destination are you sending the results to? The Page info only applies to a few destinations.

 

The square boxes typically mean that there is a character in the output that does not have a corresponding one in the Font used.

SASdevAnneMarie
Barite | Level 11
My destination is pdf
ODS PDF FILE = "&Publipostage.\XXX_&Code..pdf" dpi=1800 startpage=no;
ODS ESCAPECHAR = "^";
Cynthia_sas
SAS Super FREQ
Hi:
This is a long shot, but are you by any chance creating graphics in the same job where you are using the ODS ESCAPECHAR for page numbering?

This Tech Support note mentions the garbled text: https://support.sas.com/kb/56/041.html and this might also apply: https://support.sas.com/kb/33/986.html .

Hope this helps,
Cynthia
SASdevAnneMarie
Barite | Level 11
Thank you, Cynthia,

I added options printerpath=pdf, I had the correct page number, but my printed logo beacame black.
Do you know please, how to avoid this ?

Thank you !
Cynthia_sas
SAS Super FREQ
Hi:
If the fix for printerpath didn't fix the issue, then Tech Support is probably your best resource to find out whether there is a workaround available. The interaction with ODS ESCAPECHAR, PDF and images has been around for a while and honestly, because of the issue, I have just always avoided using them together. So I don't know of a way around it.
Cynthia
Ksharp
Super User

What is your destination ? RTF or PDF ? Post all your code.

If it was RTF , no problem.  NOTE: don't use BODYTITLE

ods escapechar='^';

footnote J=Right font =Arial  HEIGHT=8pt 'xxx^{thispage}/^{lastpage}yyyy';
footnote2 J=l font =Arial  HEIGHT=8pt 'xxx^{pageof}yyyy';

ods rtf file='c:\temp\temp.rtf'  ;
proc print data=sashelp.heart(obs=100);run;

ods rtf close;

Ksharp_0-1649074296019.png

 

If it was PDF ,still no problem.

Ksharp_1-1649074374015.png

 

 

SASdevAnneMarie
Barite | Level 11
Thank you, my pdf destination is :
ODS PDF FILE = "&Publipostage.\XXX_&Code..pdf" dpi=1800 startpage=no;
ODS ESCAPECHAR = "^";

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 7 replies
  • 844 views
  • 2 likes
  • 4 in conversation