BookmarkSubscribeRSS Feed
lcdelta
Calcite | Level 5

Dear all,

 

I would like to do the automatic page numbering with ODS PDF. Here is the code. And I did not get the right format. Please see the attached picture. Could anyone help? Thank you.

 

options leftmargin=0.5in rightmargin=0.5in orientation=landscape nodate nobyline; *nonumber;;
ods escapechar='^';
title j=c " " j=r "Page ^{thispage} of ^{lastpage}";
options pageno=1;

lcdelta_0-1741560001780.png

 

1 REPLY 1
Ksharp
Super User

I tested your code, and got no problem.

Maybe you could try other encoding SAS like unicode sas with utf-8 encoding.

options leftmargin=0.5in rightmargin=0.5in orientation=landscape nodate nobyline nonumber;
ods escapechar='^';
ods pdf file='c:\temp\x.pdf';
title j=c " " j=r "Page ^{thispage} of ^{lastpage}";
proc print data=sashelp.heart(obs=50) noobs;run;
ods pdf close;

Ksharp_0-1741571235816.png

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 302 views
  • 0 likes
  • 2 in conversation