A PDF processor written in Go.

View the Project on GitHub hhrutter/pdfcpu



Generate a set of PDF files for inFile in outDir according to given span value. Also check out the extract pages command which gives you similar functionality. Have a look at some examples.


pdfcpu split [-v(erbose)|vv] [-upw userpw] [-opw ownerpw] inFile outDir [span]


flag description required
verbose turn on logging no
vv verbose logging no
upw user password no
opw owner password no


name description required default
inFile PDF input file yes  
outDir output directory yes  
span split span in pages no 1


The following PDF elements are not carried over into the output files:


Split up a PDF input file into single page PDF files in out:

pdfcpu split test.pdf out

Split up a PDF input file into individual PDF files for every sheet of paper. Every PDF output file in out spans 2 pages of the original:

pdfcpu split test.pdf out 2