Bug 705986

Summary: New PDF interpreter breaks internal links
Product: Ghostscript Reporter: Naruto <naruta>
Component: PDF WriterAssignee: Default assignee <ghostpdl-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P4    
Version: 9.56.1   
Hardware: Macintosh   
OS: MacOS X   
Customer: Word Size: ---
Attachments: input file
output of new interpreter
output of old interpreter

Description Naruto 2022-10-17 09:46:43 UTC
Created attachment 23316 [details]
input file

Using the new interpreter results in broken/missing internal links. Note the 2 external links on the first page are preserved, but the first 4 internal links on page 2 are missing/broken (the rest are invalid because the pages were removed).

`ps2pdf -dPrinted=false in.pdf out-new.pdf`
`ps2pdf -dNEWPDF=false -dPrinted=false in.pdf out-old.pdf`
Comment 1 Naruto 2022-10-17 09:47:19 UTC
Created attachment 23317 [details]
output of new interpreter
Comment 2 Naruto 2022-10-17 09:47:47 UTC
Created attachment 23318 [details]
output of old interpreter
Comment 3 Ken Sharp 2022-10-17 09:58:27 UTC
(In reply to Naruto from comment #0)
> Created attachment 23316 [details]
> input file
> 
> Using the new interpreter results in broken/missing internal links. Note the
> 2 external links on the first page are preserved, but the first 4 internal
> links on page 2 are missing/broken (the rest are invalid because the pages
> were removed).

It would be helpful to be more descriptive in your report, it's not entirely obvious what you mean when you say "the first 4 internal links". I'm going to assume you mean the Link annotations and that you are referring to the "Table of Contents" and the "Preface" text which has a /Link annotation with a /Dest on Page 3.

This appears to work correctly with the current release, which is 10.00.0, I think you will find that if you upgrade to the current release this has already been resolved.