Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding page numbers when concatenating PS files

Status
Not open for further replies.

william1979

Technical User
May 8, 2007
1
0
0
GB
Hi,

I use adobe distiller to combine multiple PS files into one PDF document. I use the following code to achieve this.

What I cannot figure out is how to (if it is possible) to add page numbers to the bottom of each page, so that when the PDF is produced the page numbers are displayed.

Because I'm creating 100s of documents, all with varying numbers of pages, doing this individually in Acrobat is not realistic.

Any help appreciated (even if to advise that it isn't possible)

Thanks,

Will

[/prun { /mysave save def % Performs a save before running the PS file
dup = flush % Shows name of PS file being run
RunFile % Calls built in Distiller procedure
clear cleardictstack % Cleans up after PS file
mysave restore % Restores save level

} def

(O:/PS_Files/QA_SUMMARY/QA_SUMMARY_201.ps) prun
(O:/PS_Files/QA_SUMMARY/QA_SUMMARY_202.ps) prun
(O:/PS_Files/QA_SUMMARY/QA_SUMMARY_203.ps) prun
(O:/PS_Files/QA_SUMMARY/QA_SUMMARY_204.ps) prun
(O:/PS_Files/QA_SUMMARY/QA_SUMMARY_205.ps) prun]
 
Add the page numbering to the prun command (I will call the new command pgPrun) something like:

/pgNo 1 def % initial page number assignment
/pagenoPositionX 30 def % An example, put real X value here
/pagenoPositionY 30 def % An example, put real Y value here

/pgPrun
{
/Helvetica 10 selectfont pagenoPositionX pagenoPositionY moveto
/tempstr 10 string def
pgNo tempstr cvs show
/pgNo pgNo 1 add def

prun % call the original prun command
} def

And then use pgRun in your code.

I hope that this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top