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.
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
- A combined bundle, court book or production volume needs to be broken back into its separate documents.
- A long report or transcript with chapter bookmarks should be served or filed as separate files.
- Documents were combined with a bookmark for each one and now need to be separated again.
How to run it
- Choose the folder of bookmarked PDFs as Input and an Output folder outside it. Only
.pdffiles are processed. - Open one of the PDFs and look at its bookmarks to decide which level marks the start of each document.
- Set level (1 is the top level).
- Decide on front-matter: keep the pages before the first bookmark as their own part, or leave them out.
- 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
| Setting | What it does | Type 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. |
number1 |
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/notrue |
Common settings
| Setting | What it does | Type 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/notrue |
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. | number4 |
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).
files\<name>\<name>_01_<title>.pdf …: The parts, numbered in page order, in a folder per source PDF. Characters not allowed in file names are replaced and long titles are shortened.split-bookmarks.csv: One row per part: Part, PartTitle (the full bookmark title), FirstPage, LastPage, Pages, Status, Destination, MD5 and Notes. A PDF without usable bookmarks gets a single row whose Status says why.errors.csv: PDFs that could not be opened (damaged or password-protected), with the reason.
Report columns
RelativePathFileNameStatusPartPartTitleFirstPageLastPagePagesDestinationMD5NotesSourcePath
Check the result
- Filter the report on Status.
No bookmarks,No bookmarks at level 2and similar mean nothing was written for that PDF.Skippedmeans a bookmark started on the same page as the next one, so its pages are in the next part. - Read the Notes column: it reports bookmarks that do not point to a page in the document, bookmarks out of page order (parts always follow page order), and removed links.
- Check the notes for parts not written because they would have contained other pages.
- Check the page ranges add up to each document's page count, especially when front matter is off.
- 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.
- 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
- Combine PDFs: Combines PDFs into one: all of them, one per folder (e.g. an email with its attachments), or one per family by name. Each document is bookmarked, with its own bookmarks kept beneath.
- Split PDFs: Splits PDFs into parts no larger than a file size (for court upload limits) or of a set number of pages, named name_001.pdf… or by Bates number. Bookmarks are kept in the part they point to.
- Flatten PDFs: Bakes form fields, comments and other annotations into the page so they can no longer be edited, hidden or deleted, writing flattened copies. Links are kept unless you choose otherwise. Annotations with nothing to draw, or not shown on screen, are left and reported. Comment text that is not shown on the page is saved to comments.csv.
- Rename Files: Renames files with find/replace (text or regex), prefix and suffix rules, or an old name → new name list. Copies to the output folder by default, or renames in place with a full change log.