I need to split one PDF file into multiple PDFs, but using specific page ranges.
This CPDF command will split multiple page ranges, but merge them into a single PDF file.
cpdf in.pdf 1-3,90-97,112-end -o out.pdf
I need a command that will carry out a similar function to the above command, but output each page range to its own PDF.
I've looked for solutions to this problem in the PDFTK and CPDF documentation, but haven't found any help.
You can do this with
cpdf
using a simple for-loop:Similarly to BeastOfCaerbannog’s answer above, you can also do this with Ghostscript. Just remember to quote your ranges if they are non-consecutive!