Tuesday, June 2, 2020

Split a PDF file into multiple pages

If you ever needed to split a PDF file into separate PDF documents, say when someone sent you a PDF file with details for one customer on pages 1-2, and the next one from 3-4 etc. There is a quick and easy way under Ubuntu.

We will need to install qpdf first.
sudo apt install qpdf

After which we can use the program to extract and create the PDF documents for us.

 qpdf --split-pages=2 infile.pdf outfile.pdf

This will use the infile.pdf as source and output PDF files as outfile-001-002.pdf, outfile-003-004.pdf...