Split
Split pages from one PDF into one or more new PDFs.
The page range can
- make subsets (e.g., pages 1-20 or every 5th page from 1-100)
- delete pages, by dropping them from the range extracted
- insert blank pages, by splitting a phantom page
0
(zero)
- arbitrarily rearrange pages (e.g., reverse all pages)
- add duplicate pages (e.g., three copies of the signature page of a contract)
Options
java tool.pdf.Split [options] PDF-filename
- -page range --
extract pages in range.
PDF page numbers refer to physical pages, not logical numbers or the numbers printed on the pages,
from 1 to the total number of pages.
A blank page can be inserted with the special case page number of 0 (zero).
A single PDF can be split into multiple PDFs by supplying multiple page ranges separated by semicolons.
- -password password -- password if PDF is encrypted
The split version of the PDF is named with -x
appended to the original file name.
Examples
1. Subset the first 20 pages and three copies of the last.
% java tool.pdf.Split -page 1-20,last,last,last contract.pdf
2. Rearrange pages to all odd followed by all even.
% java tool.pdf.Split -page odd,even for-non-duplex-copier.pdf
3. Delete page 5.
% java tool.pdf.Split -page 1-4,5-end contract.pdf
4. Insert blank page after cover page.
% java tool.pdf.Split -page 1,0,2-end report.pdf
5. Split page ranges into multiple PDFs by separating ranges with semicolons.
% java tool.pdf.Split -page '1-12;13-20;21-end' book-with-chapters.pdf