I'm searching for a way to split up a full PDF into single PDFs containing the single chapters of the document.
Usually I'm using pdfjam to split / merge / ... PDFs, is there a simple way to split up depending on the table of content?
I'm searching for a way to split up a full PDF into single PDFs containing the single chapters of the document.
Usually I'm using pdfjam to split / merge / ... PDFs, is there a simple way to split up depending on the table of content?
Thanks to samcarters answer I found a nice solution using sejda. The command to split up a PDF depending on the 1st level of the table of content, created with hyperref using LaTeX reads
sejda-console splitbybookmarks --bookmarkLevel 1 --files <input.pdf> --output <output_directory>
Based on the comment How to create individual chapter PDFs
If you have a document that uses hyperref, e.g. this one
\documentclass{book}
\usepackage{hyperref}
\usepackage{lipsum}
\begin{document}
\chapter{chap1}
\lipsum
\chapter{chap2}
\lipsum
\end{document}
you can use pdfsam to split at a bookmark level of your choice using this option:
In the next step you can chose your file, the bookmark level and the output name and location
pdfsam, according to this comment https://tex.stackexchange.com/questions/31334/how-to-create-individual-chapter-pdfs#comment61715_31334 it allows you split by hyperref bookmarks. – samcarter_is_at_topanswers.xyz Dec 21 '18 at 10:51