-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
Links are lost after combining PDFs #341
Comments
Hello @vekunz! As you noted, the links do not work after the pages are merged because the links reference Named Destinations. Named Destinations are stored under the This limitation has come up before in #159 and #218. I would like to see this issue resolved, but haven't had any time to work on it. I'd be open to discussing a solution to anybody interested in implementing a fix for copying catalog entries between documents! |
Hi @Hopding, Thanks for your great work! I'd like to support you in copying catalog entries between documents. I'm new to PDFs internal workings but am a quick learner. I started researching the format and feel like I've got a good overview. Since you know about pdf-lib best, do you have any suggestions for implementing this feature? My first (uneducated) guess would be:
|
Added this to the roadmap for tracking: #998. |
Wonderful lib! Know this old issue and closed, but links still do not work on merge in latest release. Hoping for support in future. |
any updates for internal link to work? |
This is how i post process multiple documents after using copy pages.
How it works:
|
Thanks for sharing @Ludevik. This has been very helpful. One issue I did encounter is that my sources seem to have duplicate
|
@FiveOFive nice fix. we don't have such case, so i didn't encounter the issue. |
Is it possible to see the calling of these functions in context? Having trouble knowing what to pass for sources vs target, etc.? Thanks! |
there's not much to add. sources and target are of type PDFDocument. you can either create new PDFDocument or open existing one and then pass them to the function. in my scenario i use
|
Hi, I use pdf-lib to combine multiple PDFs. One of the PDFs has links in it, like a table of contents. The links direct to other pages of the same PDF. the problem is that these links are lost after combining PDFs with pdf-lib.
Is there a way to preserve the links?
My code:
Edit: I found out that the links are saved as "Named Destinations" in the PDF. The PDF has Version 1.4. One option would be that I add the destinations after merging, but then I need an option to add these to the pdf manually.
The text was updated successfully, but these errors were encountered: