Skip to content

Add an option to create PDF outlines (chapter bookmarks) based on header structure.#5

Open
WiDuMu wants to merge 5 commits intofellmann:mainfrom
WiDuMu:header-outlines
Open

Add an option to create PDF outlines (chapter bookmarks) based on header structure.#5
WiDuMu wants to merge 5 commits intofellmann:mainfrom
WiDuMu:header-outlines

Conversation

@WiDuMu
Copy link
Contributor

@WiDuMu WiDuMu commented Dec 27, 2025

It can be helpful for some markdown documents to create chapter bookmarks (in PDF parlance, an outline) based on the headers put into the document. This PR aims to add this functionality to pdfkit-markdown.

This would involve updating to a version 0.17 of pdfkit and adding some coordinating logic.

Before:
Screenshot_20251223_210801
After:
Screenshot_20251223_210829

@fellmann
Copy link
Owner

I like the idea. Are you still working on this?

@WiDuMu
Copy link
Contributor Author

WiDuMu commented Dec 29, 2025

Yes, I'm not happy with the configuration options (you should be able to set what headers get put into the outline), and it's behavior with weird header arrangents, it's a work in progress.

@WiDuMu
Copy link
Contributor Author

WiDuMu commented Jan 10, 2026

On further examination, it seems that there is not a required update in pdfkit, only the typescript types for development to at least @types/pdfkit version 0.13.8 from December 19th 2024.

@WiDuMu WiDuMu marked this pull request as ready for review January 10, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants