Postscript仅在最后一页添加页脚

Postscript仅在最后一页添加页脚,postscript,Postscript,我正在使用一个生成PostScript文件的工具(abcm2ps)。它允许我添加自定义邮政编码。现在我知道如何在第一页添加页脚。像这样: /cpr { 0 eq { % first page only gsave /Arial 9 selectfont 300 30 moveto % center the text (Footer) showc grestore } if } def << /BeginPage { cpr } >> setpagedevice

我正在使用一个生成PostScript文件的工具(abcm2ps)。它允许我添加自定义邮政编码。现在我知道如何在第一页添加页脚。像这样:

/cpr {
0 eq {   % first page only
gsave
/Arial 9 selectfont
300 30 moveto    % center the text
(Footer) showc
grestore
} if
} def
<< /BeginPage { cpr } >> setpagedevice
/cpr{
0 eq{%仅第一页
gsave
/Arial 9选择字体
300 30%移动以使文本居中
(页脚)showc
格雷斯托
}如果
}def
>设置页面设备
如何仅在最后一页添加页脚


谢谢

您需要知道PostScript程序中有多少页,如果您不知道,则无法在“最后”页上添加页脚。如果您的文件符合DSC,它将告诉您其中有多少页。

好的,我检查了文件,它说
%%页:(atend)
在文件末尾找到了这些页。谢谢