Skip to content

[Bug]: /GoToE links not working when /R /P (relation is child) #20672

@ousia

Description

@ousia

Attach (recommended) or Link to PDF file

hypgotoe-example.pdf contains an embedded PDF document and /GoToE links from parent to child and from child back to parent.

Links with target related as child work as expected, but there are two links from child (actually, it is https://github.com/user-attachments/files/25358383/hypgotoe-example.pdf#ef=hypgotoe-child.pdf (only works with #20671 implemented) to parent that don’t work.

These are the following objects (from hypgotoe-child.pdf):

12 0 obj
<<
  /Type /Annot
  /Border [ 0 0 1 ]
  /H /I
  /C [ 0 1 1 ]
  /Rect [ 132.772 632.481 285.74 643.329 ]
  /Subtype /Link
  /A <<
    /Type /Action
    /S /GoToE
    /D (page.1)
    /T <<
      /R /P
    >>
  >>
>>
endobj

13 0 obj
<<
  /Type /Annot
  /Border [ 0 0 1 ]
  /H /I
  /C [ 0 1 1 ]
  /Rect [ 132.772 620.526 297.336 631.374 ]
  /Subtype /Link
  /A <<
    /Type /Action
    /S /GoToE
    /D (page.2)
    /T <<
      /R /P
    >>
  >>
>>
endobj

Web browser and its version

147.0.3

Operating system and its version

Fedora 43

PDF.js version

the one that comes with Firefox 147.0.3.

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open hypgotoe-example.pdf .

  2. Click any link that goes to embedded file.

  3. Try to click any of the links from the child document to the main one.

What is the expected behavior?

Links in hypgotoe-child.pdf to parent should back to main document as intended.

What went wrong?

Links from child (embedded document) to parent (main document) don’t work.

Link to a viewer

No response

Additional context

hypgotoe-child.pdf validates perfectly fine against the current Arlington model.

Example 2 from printed page 421 of the PDF-1.7 spec) contains:

2 0 obj
 << /Type /Action
    /S /GoToE
    /D (Chapter 1)
    /T << /R /P >>
 >>
endobj

Many thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions