Bug 690843

Summary: ps2pdf page numbering problem
Product: Ghostscript Reporter: satoichi
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P4    
Version: 8.70   
Hardware: PC   
OS: Linux   
URL: http://latex-community.org/forum/viewtopic.php?f=52&t=6328
Customer: Word Size: ---
Attachments: LaTeX file sample.tex
Sample postscript file
foo.diff - roman and decimal labels in one file.

Description satoichi 2009-10-23 17:48:49 UTC
On some postscript files created by LaTex, ps2pdf will create a PDF with nothing
but roman page numbers in the page navigation menu of PDF viewers such as
Acrobat Reader and Evince. The page numbers on the document pages themselves are
fine, it's just in the viewer where the problem occurs. The URL above has a
picture of the problem in Acrobat Reader, along with a sample LaTeX file that
reproduces the problem. To create the PDF, call that sample file sample.tex,
then do this:

latex sample.tex
dvips -Ppdf -G0 -z sample.dvi
ps2pdf sample.ps

This problem only appeared when upgrading to Ghostscript 8.70, which comes with
Fedora 11. It does not happen, for example, with Ghostscript 8.15 in Fedora 7.
The postscript file itself is fine; in a viewer such as gv the postscript file's
page numbers appear correctly in the page navigation bar. So it appears that
ps2pdf is the culprit.

If it helps, the version of LaTeX being used is from TexLive 2007, in Fedora 11.
Comment 1 satoichi 2009-10-23 17:54:16 UTC
Created attachment 5535 [details]
LaTeX file sample.tex

This sample file LaTeX reproduces the problem in ghostscript 8.70.
Comment 2 Alex Cherepanov 2009-10-23 19:03:42 UTC
Please attach your sample.ps file.
PostScript is what Ghostscript programmers know the best.
Comment 3 satoichi 2009-10-23 21:08:16 UTC
Created attachment 5536 [details]
Sample postscript file

Here's the postscript file that gets created.
Comment 4 Alex Cherepanov 2009-10-24 08:55:21 UTC
Your PostScript file requests roman numerals in the page labels.
gs v. 8.70 and Adobe Distiller honor this request.
Older versions of Ghostscript ignored this request and generated
PDF file that uses default decimal labels.

For instance, the sample file modified with the patch attached
shows first 7 pages with roman labels and continues with decimal
ones.

I have no idea why LaTeX generates such PS file but Ghostscript
works as designed.
Comment 5 Alex Cherepanov 2009-10-24 08:56:59 UTC
Created attachment 5538 [details]
foo.diff - roman and decimal labels in one file.