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

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—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
  • 1 reply
  • 373 views
  • 0 likes
  • 2 in conversation