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

Hi All,

 

I am using below options to display page numbers in pdf document 

 
 

ODS escapechar='^';

title3   j=right  'page ^{thispage} of ^{lastpage}';

 

but getting bellow output:

<RPage 1 of @>

 

can anyone help out me to get exact page numbers 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Show the log from a code example that produces the wrong page numbers; start with the initial ODS PDF, and end with the ODS PDF CLOSE. If you use data that can't be taken out of SASHELP, provide it in a data step with datalines.

View solution in original post

4 REPLIES 4
RichardDeVen
Barite | Level 11

You will need to show more of your code, or a reproducible example.

 

The following example does number pages correctly

options papersize = (8.5in 2in);

ods pdf file="cars.pdf" style=journal; ODS escapechar='^'; title "sashelp.Cars" j=right 'page ^{thispage} of ^{lastpage}'; proc print noobs data=sashelp.cars; var make model type msrp invoice; run; ods pdf close;

PDF view capture

RichardADeVenezia_0-1599130775427.png

 

KalaBhairava
Quartz | Level 8

yes , initially it came but what happened I don't know suddenly it's did't work and not generating page numbers, do we have any other options to generate page numbers?

 

If I use below options it printing  like page 1,  but I want it as page 1 of 4

page ^{thispage}

 

 

Kurt_Bremser
Super User

Show the log from a code example that produces the wrong page numbers; start with the initial ODS PDF, and end with the ODS PDF CLOSE. If you use data that can't be taken out of SASHELP, provide it in a data step with datalines.

KalaBhairava
Quartz | Level 8

Thank you very much for your message, It's working fine now , I will give you screen shot of log if I face same issue again

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
  • 4 replies
  • 1665 views
  • 0 likes
  • 3 in conversation