Install #
Download and extract pdfcpu.
Copy the pdfcpu
binary somewhere in your PATH
.
Commands #
Extract a range into separate PDFs per page #
pdfcpu extract -mode page -pages 3-4 my-file.pdf" .
Extract a range into a single PDF #
pdfcpu collect -pages 3,4 "my-file.pdf" pages3-4.pdf
Create a “2-up” PDF (two pages side by side) in landscape orientation #
pdfcpu nup 'formsize:LetterL' 2up.pdf 2 'my-file.pdf"
Rotate all pages 90 degrees clockwise #
pdfcpu rotate 'my-file.pdf' 90 'my-file-rotated.pdf'
Rotate counter-clockwise #
pdfcpu rotate 'my-file.pdf' -90 'my-file-rotated.pdf'
Rotate a single page within all pages #
pdfcpu rotate -pages 1 'my-file.pdf' 90 'my-file-rotated.pdf'
Resources #
Alternatives #
Qpdf also has options for rotation.