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

Adding New Bookmarks to Merged PDFs #335

Closed
meerkat-mary opened this issue May 21, 2021 · 12 comments
Closed

Adding New Bookmarks to Merged PDFs #335

meerkat-mary opened this issue May 21, 2021 · 12 comments
Assignees
Labels

Comments

@meerkat-mary
Copy link

Hi pdfcpu developers,

Is it possible to add new bookmarks (so that it appears in the sidebar) using pdfcpu? I've been able to use this excellent library to merge multiple documents together and it would be great to polish the output PDF with sidebar bookmarks to help make it easier for my users to navigate through (large) PDFs

Perhaps functionality that works in a similar way to WaterMarkMaps where you can construct a bookmark and page number map and the library wizzes through and adds them? 😀

If there is a way to get this done with the existing library functions, could you kindly provide a code example please? I had a look and I was only able to find a Split by Bookmark feature in the API

Grateful for your time!
Mary

@hhrutter hhrutter self-assigned this May 22, 2021
@hhrutter
Copy link
Collaborator

Hello!

This sounds like a useful feature and goes into the pipeline.

@meerkat-mary
Copy link
Author

Thank you @hhrutter :)

@elucidsoft
Copy link

+1

@hhrutter
Copy link
Collaborator

This feature is now part of v0.3.12 !
Checkout: bookmarks_test.go

@meerkat-mary
Copy link
Author

Amazing, thank you so much @hhrutter ⭐️ - I'll test it out

@hhrutter
Copy link
Collaborator

👍 Let me know

@meerkat-mary
Copy link
Author

Hi @hhrutter - the bookmarking functionality works great, thank you very much!

There's a minor issue where it has trouble adding certain characters e.g. for the following Title "Applicant’s Form" - the apostrophe comes out garbled (attached screenshot)

image

The apostrophe was added in windows FYI (though I'm viewing the PDF on a Mac)

@hhrutter hhrutter reopened this Jul 23, 2021
@hhrutter
Copy link
Collaborator

Thanks for reporting this!

@hhrutter
Copy link
Collaborator

This is fixed with latest commit!

@meerkat-mary
Copy link
Author

Amazing, thank you! ⭐️

@iilyak
Copy link

iilyak commented Jan 2, 2023

How do I use this feature from CLI?

@hhrutter
Copy link
Collaborator

hhrutter commented Jan 4, 2023

Sorry, not available via the CLI.
Also.. kind of complicated, there may be nested bookmarks..

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

No branches or pull requests

4 participants