Bug 695162

Summary: Internal hyperlinks lost when converting to pdf
Product: Ghostscript Reporter: Ulrike Fischer <news3>
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal CC: htl10
Priority: P4    
Version: 9.14   
Hardware: PC   
OS: Windows 7   
Customer: Word Size: ---
Attachments: ps-file, two pdf-files: one ok, one faulty.
hopefully correct zip file with a ps and two pdf

Description Ulrike Fischer 2014-04-14 05:51:29 UTC
Created attachment 10829 [details]
ps-file, two pdf-files: one ok, one faulty.

When I compile this latex document 

\documentclass{book}
\usepackage{hyperref}
\begin{document}
\chapter{Titre}
lala\ref{chp:deux}
\chapter{Titre}\label{chp:deux}
\end{document}

with latex + dvips from a current tex system to a ps and then use "pdfwrite" in gsview to convert to a pdf file the internal hyperlink doesn't work in gs9.14. There is no problem when gs9.07 is used. 

latex+dvips+ps2pdf has the same problem in a current texlive (with gs9.14), but works fine with older gs9.14.

The attachment contains the ps-file and the two pdf-files created from it with pdfwrite. 

I used for the test Ghostscript 9.14 for Windows (64 bit) installed today from this source: http://www.ghostscript.com/download/gsdnld.html. 

Ulrike Fischer
Comment 1 Ken Sharp 2014-04-14 07:01:42 UTC
(In reply to comment #0)
> Created attachment 10829 [details]
> ps-file, two pdf-files: one ok, one faulty.

Both WinRAR and Winzip tell me the archive is corrupt, could you try again please ?
Comment 2 Ulrike Fischer 2014-04-14 07:06:31 UTC
Created attachment 10830 [details]
hopefully correct zip file with a ps and two pdf
Comment 3 Ulrike Fischer 2014-04-14 07:07:51 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Created attachment 10829 [details]
> > ps-file, two pdf-files: one ok, one faulty.
> 
> Both WinRAR and Winzip tell me the archive is corrupt, could you try again
> please ?

I have added a new attachment. How can I delete the faulty one?
Comment 4 Ken Sharp 2014-04-14 07:13:56 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > Created attachment 10829 [details]
> > > ps-file, two pdf-files: one ok, one faulty.
> > 
> > Both WinRAR and Winzip tell me the archive is corrupt, could you try again
> > please ?
> 
> I have added a new attachment. How can I delete the faulty one?

Normally you select the 'obseletes attachemnt' box, but don't worry about it, I can read the new one.
Comment 5 Hin-Tak Leung 2014-04-22 15:42:46 UTC
Hmm, a better description of this and bug 695175 is probably that "pdfmark's in input ps are mis-processed in 9.14, a regression from 9.10".
Comment 6 Ken Sharp 2014-04-23 01:51:09 UTC
commit c79b0ee1dbc1cbbcbe406abd4bc47f617ed5cb2c fixes this problem for me. It seems that either I misunderstood the PDF reference manual or Acrobat doesn't follow it, references to named destinations in a Names tree must be string objects, not name objects, even though the spec says both are valid.