我想在每一页的右下角有一个“Y页的X”格式的页码。我尝试了下面的pdf结果代码,但它只是字面上显示了"Page *{ the Page} of &num“。有人能帮忙吗?谢谢!
* create the file with the number of pages */
ods results;
ods pdf file="c:\temp\pagenumb.pdf" compress=0;
footnote j=r "Page *{thispage} of &num";
%pdf_code;
ods pdf close;发布于 2013-11-27 01:50:48
你很接近你的尝试。我会这样做:
例如:
options nodate nonumber;
data work.animals;
input name $ weight;
datalines;
monkey 20
shark 500
lion 200
wolf 120
buffalo 400
;
run;
ods pdf file = 'C:\sasdata\animals.pdf';
ods escapechar= '!';
proc print data=work.animals;
title 'Animals';
footnote j = r 'Page !{thispage} of !{lastpage}';
run;
ods pdf close;
ods listing;基本上,我选择了使用感叹号"!“作为吸引SAS注意的一个方法。然后,我们可以使用脚注与正确的理由,因为我们希望它在右下角(j = r)。我们也可以使用j = l or c or r,这取决于您希望脚注放在哪一边。
最后,我使用了ods listing,因为我不想在SAS中查看输出(我只想输出一个pdf文件)。干杯。
https://stackoverflow.com/questions/20230899
复制相似问题