Skip to content

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

Open
WiDuMu wants to merge 5 commits into
fellmann: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 into
fellmann:mainfrom
WiDuMu:header-outlines

Conversation

@WiDuMu

@WiDuMu WiDuMu commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Owner

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

@WiDuMu

WiDuMu commented Dec 29, 2025

Copy link
Copy Markdown
Contributor Author

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

WiDuMu commented Jan 10, 2026

Copy link
Copy Markdown
Contributor Author

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
@WiDuMu

WiDuMu commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

I did mark it ready for review.

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