Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
soymanuvalle opened this issue Apr 8, 2025 · 1 comment
Open

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

soymanuvalle opened this issue Apr 8, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@soymanuvalle
Copy link

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

@bollain bollain self-assigned this Apr 8, 2025
@bollain
Copy link
Collaborator

bollain commented Apr 8, 2025

Hi @soymanuvalle,

Thanks for this report - I have added it to our backlog. You'll receive an update through this issue when this is fixed.

@bollain bollain added the bug Something isn't working label Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants