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

Breaks href to element by id #100

Open
bruncanepa opened this issue Sep 15, 2022 · 6 comments
Open

Breaks href to element by id #100

bruncanepa opened this issue Sep 15, 2022 · 6 comments
Labels
bug Something isn't working pdf-lib This problem was comes from pdf-lib and should be solved there

Comments

@bruncanepa
Copy link

I've to add a Table of Contents with links to each section of my doc. For that I'm adding <a href="#sectionId"> Section </a>.

The Table of Content is created as a separated PDF after the content PDF so I know in which pages is each. In this situation links are rendered correctly.

But when I merge both PDFs, only these types of links are broken.

Is there any solution for this?

Thanks!

@mojoaxel mojoaxel added the pdf-lib This problem was comes from pdf-lib and should be solved there label Sep 19, 2022
@mojoaxel
Copy link
Collaborator

This is an interesting one! Maybe we could create a very simple example to reproduce this?

@mojoaxel mojoaxel added the bug Something isn't working label Sep 19, 2022
@Mall0c
Copy link

Mall0c commented Oct 13, 2022

I am experiencing the same issue with a TOC. After merging pdf documents, even if I feed the pdf merger only one document, hrefs in the TOC don't work anymore.

@mojoaxel
Copy link
Collaborator

This is likely an issue of the pdf-lib. If you could provide a very basic example we could file a bug report over there.

@Mall0c
Copy link

Mall0c commented Oct 13, 2022

I've built an example: https://github.com/Mall0c/pdf-merger-js-href-example

If something's unclear in the example, feel free to ask. I think its self-explaining though.

@pedroresende
Copy link

@mojoaxel First thank you for the great library that you've developed, it's been a life-savier.

Do you have any news about this issue?

@Ludevik
Copy link

Ludevik commented Feb 23, 2024

Hopding/pdf-lib#341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pdf-lib This problem was comes from pdf-lib and should be solved there
Projects
None yet
Development

No branches or pull requests

5 participants