BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Doug____
Pyrite | Level 9

Using the following code:

 

ods escapechar = "^";

footnote height = 7pt 'Page ^{thispage} of ^{lastpage}';

 

The following result is shown:

 

Capture.PNG

 

What causes this?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  This works for me in SAS 9.4M5:

pagenum_works_94M5.png

As you can see, I used the ESCAPECHAR functions in both the TITLE and the FOOTNOTE and they both worked in PDF. Since you didn't show all your code, it could be a style issue, a font issue or some other issue. There were, in the past, problems possible if you tried to use {thispage} and {lastpage} in code that included Graphics procedure output or background images. But you didn't show your code, so it's hard to tell. Here are some relevant Tech Support notes to check out.

http://support.sas.com/kb/56/041.html and

http://support.sas.com/kb/34/573.html

 

  If none of the suggested fixes work for you, then I'd suggest opening a track with Tech Support.

 

Cynthia

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  This works for me in SAS 9.4M5:

pagenum_works_94M5.png

As you can see, I used the ESCAPECHAR functions in both the TITLE and the FOOTNOTE and they both worked in PDF. Since you didn't show all your code, it could be a style issue, a font issue or some other issue. There were, in the past, problems possible if you tried to use {thispage} and {lastpage} in code that included Graphics procedure output or background images. But you didn't show your code, so it's hard to tell. Here are some relevant Tech Support notes to check out.

http://support.sas.com/kb/56/041.html and

http://support.sas.com/kb/34/573.html

 

  If none of the suggested fixes work for you, then I'd suggest opening a track with Tech Support.

 

Cynthia

Doug____
Pyrite | Level 9

Cynthia,

 

Thanks for the links to the KB notes. The PRINTERPATH = PDF option activation seems to have resolved the issue.

Konstantin_P
Calcite | Level 5

I had the same issue with "Lastpage".

 

This problem is described here Problem Note 56041: The LASTPAGE inline style command might display garbled text in PDF files 

The following line was a solution in my case:

options printerpath=pdf;

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
  • 3 replies
  • 2708 views
  • 2 likes
  • 3 in conversation