[gs-bugs] [Bug 691889] New: pdfwrite with "/PAGELABEL pdfmark" operator does not work with multiple pages

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Fri Jan 14 17:38:29 UTC 2011


           Summary: pdfwrite with "/PAGELABEL pdfmark" operator does not
                    work with multiple pages
           Product: Ghostscript
           Version: HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P4
         Component: PDF Writer
        AssignedTo: ken.sharp at artifex.com
        ReportedBy: pipitas at googlemail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0

Created an attachment (id=7130)
 --> (http://bugs.ghostscript.com/attachment.cgi?id=7130)
simple shell script to make Ghostscript create a 50 page PDF with modified
/DOCINFO pdfmark

I'm re-testing the pdfmark operator functionality of Ghostscript.

This is how I try to change the page labels of a 50 page PDF document. This
document itself was created by a little shell script of mine using
Ghostscript's pdfwrite device with the "/DOCINFO pdfmark" to change some meta
data (which works perfectly). Anyway, here is how I tried to change the page

  gs \
    -o modified-pagelabels-50pages.pdf \
    -sDEVICE=pdfwrite \
    -c "[ /Page 1 /Label (i)    /PAGELABEL pdfmark" \
    -c "[ /Page 2 /Label (ii)   /PAGELABEL pdfmark" \
    -c "[ /Page 3 /Label (III)  /PAGELABEL pdfmark" \
    -c "[ /Page 4 /Label (four) /PAGELABEL pdfmark" \
    -c "[ /Page 5 /Label (v)    /PAGELABEL pdfmark" \
    -c "[ /Page 6 /Label (FIVE) /PAGELABEL pdfmark" \
    -f 50pages.pdf

The bug I'm seeing is this:

 * Only the last called pdfmark operator is applied (in our example it is
 * But this label is attached to page 1 instead attached to page 5.
 * All page labels for pages 2...50 are now empty (before, the labels seen were

I also tried this variation of the commandline:

  gs \
    -o modified-pagelabels-50pages.pdf \
    -sDEVICE=pdfwrite \
    -c "[ /Page 1 /Label (i)     " \
    -c "  /Page 2 /Label (ii)    " \
    -c "  /Page 3 /Label (III)   " \
    -c "  /Page 4 /Label (four)  " \
    -c "  /Page 5 /Label (v)     " \
    -c "  /Page 6 /Label (FIVE) /PAGELABEL pdfmark" \
    -f 50pages.pdf

The result of his one:

 * The first page was labelled "i".
 * All page labels for pages 2...50 are also empty (in the original PDF the
labels seen are "2"..."50").

Now there are 3 possibilities:

 1. Maybe my way of trying to achieve page labelling is wrong because I didn't
fully comprehend the specs.
 2. Maybe Ghostscript isn't supposed to support the full pdfmark specification
for page labels.
 3. Maybe this is a genuine Ghostscript bug. (I tested with v8.71, v9.00 and
v9.01svn on Linux).

Please let me know which it is. In case of "1", please let me know how to make
it right. In case of "2", please point me to a resource that describes the
scope of Ghostscript's pdfmark support.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list