Skip to content

[Bug] Custom page labels not showing on LinkAnnotationPopup #1093

Open
@soymanuvalle

Description

@soymanuvalle

WebViewer version
Latest

The current behavior
Page jump links not showing the correct page label on LinkAnnotationPopup.

The expected behavior
The LinkAnnotationPopup text should show the correct page label instead of the original PDF page number.

Steps to reproduce
File: src/helpers/getLinkDestination.js

export default (linkAnnotation) => {
  if (!linkAnnotation) {
    return;
  }
  if (linkAnnotation.actions.U?.[0] instanceof window.Core.Actions.URI) {
    return linkAnnotation.actions.U?.[0]?.uri;
  }
  if (linkAnnotation.actions.U?.[0] instanceof window.Core.Actions.GoTo) {
    // TODO Need translation for this in the actual component that uses this helper
    return `Page ${linkAnnotation.actions.U?.[0]?.dest.page}`;
  }
};

As you can see the page number is rendered instead of the page label causing confussion when hovering the link:
Image

Our custom page label is set to 6, however when hovering the link it shows Page 8 (the original page number). Also as mentioned on the comment of the file the text is fixed to english and not being translated

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions