Skip to content
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

referencedPage set as NaN for internal-links on a pdf generated by Adobe #126

Closed
GinoVillalpando opened this issue Jul 9, 2024 · 3 comments · Fixed by #129
Closed

referencedPage set as NaN for internal-links on a pdf generated by Adobe #126

GinoVillalpando opened this issue Jul 9, 2024 · 3 comments · Fixed by #129

Comments

@GinoVillalpando
Copy link

In a recent project, I was given a task to use internal links to jump to a specific page. When using the internal-link event type I noticed the referencedPage was always coming back as NaN and would break the entire pagination. I noticed the document was generated originally using Adobe inDesign which I'm not too familiar with but is probably another text document editor. I added the links but in Microsoft Word this time and that worked perfectly fine. I'm assuming there are different methods when setting links to a specific spot in the pdf and could even be a bug with pdf.js. Thank you for looking into it🙏

Additional context

  • vue-pdf: ^1.10.0
  • vue: 3
if (event.type === 'internal-link') {
    page.value = parseInt(event.data.referencedPage);
}
@GinoVillalpando
Copy link
Author

further context: the regular link event type worked fine for navigating to the specified URL on the pdf generated by Adobe inDesign

@TaTo30
Copy link
Owner

TaTo30 commented Jul 10, 2024

further context: the regular link event type worked fine for navigating to the specified URL

I get confused 😅, did the link event work fine with external links like mailto, https, etc?

Could you share a PDF with those links generated by Adobe inDesign?, so I could do some research about it.

@GinoVillalpando
Copy link
Author

further context: the regular link event type worked fine for navigating to the specified URL

I get confused 😅, did the link event work fine with external links like mailto, https, etc?

Could you share a PDF with those links generated by Adobe inDesign?, so I could do some research about it.

Yes the link event worked with external links made from Adobe inDesign it was only the internal-links that link to another page in the pdf

FAQ_03.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants