-
-
Notifications
You must be signed in to change notification settings - Fork 10
Existing Bookmarks
The existing_bookmarks
attribute lets you specify what happens to existing bookmarks in the individual PDF files. They can either be dropped (remove
), kept as-is (keep
), or flattened (flatten
) as they are merged together. Care is taken to maintain hierarchy, but PDF is a tricky format and results might not always be perfect. The default value is remove
as it generates the cleanest possible PDF.
An easier way is to showcase what happens with all the cases. Given a PDF with the following structure:
Chapter 1
Chapter 2
Scene 1
Scene 2
Chapter 3
Chapter 4
Scene 3
Scene 4
And the following input markdown file:
# Volume X
[Part 1](1.pdf)
[Part 2](2.pdf)
Will result in 3 different variants depending on the value of existing_bookmarks
.
The structure is identical to the input markdown:
Volume X
Part 1
Part 2
The inner bookmarks of the PDF are flattened and nested inside the last known bookmark.
Volume X
Part 1
Chapter 1
Chapter 2
Scene 1
Scene 2
Part 2
Chapter 3
Chapter 4
Scene 3
Scene 4
Similar to flatten
, but the nested structure of the individual PDFs is maintained.
Volume X
Part 1
Chapter 1
Chapter 2
Scene 1
Scene 2
Part 2
Chapter 3
Chapter 4
Scene 3
Scene 4