I am combining several pages into one file using ghostscript.
How (if possible) can I use ghostscript to add pagenumbers to the combined file?
I am combining several pages into one file using ghostscript.
How (if possible) can I use ghostscript to add pagenumbers to the combined file?
Because the Ghostscript PDF interpreter is written in PostScript you could define a PostScript EndPage procedure to do so.
See: PDF crop even-odd pages with PHP + GhostScript
and: Postscript: watermark with varying page sizes
for examples of EndPage procedures