Split and merge PDF files (pdfjam oneliners)


Using pdfjam scripts, split input.pdf in pages:

$ pdfseparate input.pdf page-%d.pdf

Merge (concatenate) PDF documents:

$ pdfunite page-1.pdf page-2.pdf page-3.pdf output.pdf

Scripts use pdfLaTeX under the hood. The output is slightly bigger than it could be, but it works, and it's easy to use. Using ghostscript or pdftk directly could probably give smaller output files.