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

Generate bookmarks to each PDF starting point when merging multiple PDF files #867

Open
gnapse opened this issue Apr 26, 2024 · 0 comments
Labels
enhancement New feature or request pdf-engines

Comments

@gnapse
Copy link

gnapse commented Apr 26, 2024

The "merge PDFs" route (POST http://localhost:3000/forms/pdfengines/merge) could include the feature of generating bookmarks in the PDF to each of the combined documents' starting points.

Each of the input PDFs potentially has a title as metadata. This title can be used to add a bookmark in the combined PDF, that points to the first page of that input document in the output document.

See #864

Example

Input: 4 documents titled "Intro" (2 pages), "Chapter 1" (10 pages), "Chapter 2" (12 pages), "Appendix" (3 pages)
Output: A single PDF as usual, but that also has bookmarks with each document's title, and pointing to the corresponding page:

  • "Intro" (points to page 1)
  • "Chapter 1" (points to page 3)
  • "Chapter 2" (points to page 13)
  • "Appendix" (points to page 25)

Why?

PDF reader apps often show this as a table of content in their own UI, for easier navigation:

CleanShot 2024-04-26 at 09 01 22@2x

Kindle and similar devices show this table of content as well.

@gulien gulien added enhancement New feature or request pdf-engines labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pdf-engines
Projects
None yet
Development

No branches or pull requests

2 participants