Hi there, I have an PDF-Document which has some differend parts in pagenumbering A German AdobeAcrobat shows: a (1 von 124) b (2 von 124) i (3 von 124) ... x (12 von 124) 1 (13 von 124) ... 112 (124 von 124) To update PDF-Metainformation I use "%GSVersion%\bin\gswin32c.exe" -s"OutputFile#%CD%\report.pdftk.pdfasm.gs.pdf" @gs-args.dat -f"%CD%\report.pdftk.pdfasm.pdf" "%CD%\my.gs.PDFmark" The file with gs-arguments contains (all in one line): -I"C:\Program Files\gs\gs9.01\bin;C:\Program Files\gs\gs9.01\lib;C:\Program Files\gs\fonts" -s"FONTMAP#C:\Program Files\gs\fonts\fontmap" -dCompatibilityLevel#1.4 -dDEVICEWIDTHPOINTS#595 -dDEVICEHEIGHTPOINTS#842 -dEmbedAllFonts#true -dSubsetFonts#true -dCompressFonts#true -dDownsampleColorImages#false -dDownsampleGrayImages#false -dDownsampleMonoImages#false -dEncodeColorImages#true -dEncodeGrayImages#true -dEncodeMonoImages#true -sDSCEncoding#PDFDocEncoding -dPDFSETINGS#/default -dSAFER -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIEColor -sDEVICE#pdfwrite -c .setpdfwrite in my.gs.PDFmark (each enty a single line): [ /Title (cool title) /Author (one name, other name) /Subject (brief description) /Keywords (keyword, otherkeyword, something) /ModDate (D:20120306112400) /CreationDate (D:20120225221914+01'00') /Creator (information given) /Producer (information given) /Publisher (information given) /Copyright (Copyrightnote) /DOCINFO pdfmark All this meta-information was inserted in the output-document, thanks :-) But the output-document has only one style ob page numbers. A German AdobeAcrobat shows: 1 von 124 2 von 124 3 von 124 ... 12 von 124 13 von 124 ... 124 von 124 How can I make GhostScript's pdfwrite to take the pagenumberstyle from the input-document into the output-document? I found http://bugs.ghostscript.com/show_bug.cgi?id=691889 but how I can use "The 100% documented way: Issue a /PAGELABEL as part of each page." like it was said there... Best regards, Robert Hartmann
The PDF interpreter does not preserve the labels for pages, so pdfwrite has no access to that information. Thus there is no way for pdfwrite to rtake the label information from the original document. To issue a PAGELABEL for each page you would have to insert a relevant pdfmark into the input PostScript stream, since your input isn't PostScript this isn't feasible. In short there is currently no way to achieve what you are trying for. The PDF interpreter would have to be updated to issue a PAGELABEL pdfmark for the labels in the original document, in which case this would work properly I believe, since pdfwrite honours this pdfmark.
/PAGELABEL pdfmark doesn't cover all the page numbering styles available to PDF. To preserve all the information we need to invent a way to pass the /PageLabel dictionary from PDF file to the pdfwrite device.
(In reply to comment #2) > /PAGELABEL pdfmark doesn't cover all the page numbering styles available > to PDF. To preserve all the information we need to invent a way to pass the > /PageLabel dictionary from PDF file to the pdfwrite device. The obvious approach would seem to be to extend the /PAGELABEL syntax, since this is all going to be internal (its only a way for the PDF interpreter to instruct pdfwrite) this seems like the simplest way to proceed. DO you want to put a proposed list together Alex ? I'm perfectly happy to do the pdfwrite end of the work.
commit 5784bfbfba7191cacce5309e88afac0851287460 should resolve this issue. Unfortunately no specimen PDF file was provided, so I cannot test this to be sure. Testing some files from our test suite seems to work as expected however.