PDF

Split By Bookmarks

Splits each PDF into separate PDFs at its bookmarks, one part per bookmark at the chosen level, in a folder per document.

Free Command line: split-bookmarks Version 1.0

Split By Bookmarks reads each PDF's bookmarks and writes one PDF for each bookmark at the chosen level. A part runs from its bookmark's page to the page before the next bookmark at that level or higher; the last part runs to the end of the document. Parts are written to a folder named after the source file, inside the run's files folder, and named <name>_<nn>_<bookmark title>.pdf, for example book_02_Chapter 1.pdf. The originals are not changed.

Each part contains only its own pages. Links that lead to pages outside the part are removed, and each saved part is checked to make sure it holds no other page; a part that would is not written and is reported as an Error. PDFs without bookmarks are reported and not copied.

Use it when

How to run it

  1. Choose the folder of bookmarked PDFs as Input and an Output folder outside it. Only .pdf files are processed.
  2. Open one of the PDFs and look at its bookmarks to decide which level marks the start of each document.
  3. Set level (1 is the top level).
  4. Decide on front-matter: keep the pages before the first bookmark as their own part, or leave them out.
  5. Click Run, read the notes, then click Open report to see each part's title and page range.

Settings

Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help split-bookmarks lists them.

Settings

SettingWhat it doesType and default
Level
--level
Bookmark level to split at: 1 (default) is the top level, 2 the bookmarks under those, and so on. A part also ends at the next higher-level bookmark; pages under a higher-level bookmark with no bookmark at this level become their own part, named after it.
Between 1 and 20. At level 2, a part still ends where the next level-1 bookmark starts. Pages under a level-1 bookmark that are not under any level-2 bookmark (for example an Appendix with no sub-bookmarks) become their own part, named after the level-1 bookmark; the Notes column says so.
number
1
Front matter
--front-matter
Pages before the first bookmark become their own part, named '_front matter'. Off: those pages are left out (and reported).
On (default): pages before the first bookmark become part 00, named _front matter, for example book_00_front matter.pdf. Off: those pages are not written, and the Notes column gives the page range left out.
yes/no
true

Common settings

SettingWhat it doesType and default
Input required
--input
Folder (or single file) to read. It is opened read-only and never modified. folder
empty
Output required
--output
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. folder
empty
Recurse
--recurse
Include sub-folders. yes/no
true
Extensions
--extensions
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. list
empty
Parallelism
--parallelism
Files processed at once. Use 1-2 for spinning disks or network shares. number
4

What you get

Each run creates its own folder inside the output folder, with the report split-bookmarks.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • Rename the parts afterwards with Rename Files if they need document IDs rather than bookmark titles.
  • If the PDFs have form fields, flatten them first: form fields in the parts are not interactive, and the notes say so.
Watch out for
  • The split is only as good as the bookmarks. A missing or misplaced bookmark puts pages in the wrong part; check the ranges before relying on the parts.
  • Bookmarks that point to another file or to an embedded file are ignored.

From the command line

The command line is part of LitTechKit Pro. See Command line.

ltk run split-bookmarks --input "D:\Matter\Bundles" --output "D:\Matter\Bundles split" --level 1 --no-front-matter

Related tools