I'm trying to generate some reports in Postscript from my C++ program. When the report exceeds one page I need properly insert "%%Page: label NUMBER" comment into the ps-file. Starting generating the ps-file I don't know the total number of pages. I attemped to declare
/currpagenumber 1 def
and use it in the comment
%%Page: label currpagenumber
but the PS interpreter expects an ordinal integer constant instead of my currpagenumber.
If total page number is a priori unknown, how should one enumerate a multipage document in Postscript?
I'll be grateful for any assistance.
Roman
/currpagenumber 1 def
and use it in the comment
%%Page: label currpagenumber
but the PS interpreter expects an ordinal integer constant instead of my currpagenumber.
If total page number is a priori unknown, how should one enumerate a multipage document in Postscript?
I'll be grateful for any assistance.
Roman