Summary: | Preserve Page labels from input PDF when the output is PDF | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | ifrh <Robert_Hartmann> |
Component: | PDF Interpreter | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | Robert_Hartmann |
Priority: | P4 | ||
Version: | 9.01 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Customer: | Word Size: | --- |
Description
ifrh
2012-03-06 12:51:55 UTC
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. |