pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Rotate

Rotate selected pages of inFile clockwise by a multiple of 90 degrees. Have a look at some examples.

Usage

pdfcpu rotate inFile rotation [outFile] [flags]

Flags

namedescriptionrequired
p(ages)selected pagesno

Common Flags


Arguments

namedescriptionrequiredvalues
inFilePDF input file, use - to read from stdinyes
rotationrotation angleyes-270, -180, -90, 90, 180, 270
outFilePDF output file, use - to write to stdoutno

Examples

Rotate all pages of a PDF file clockwise by 90 degrees:

$ pdfcpu rotate test.pdf 90

Rotate the first two pages counter clockwise by 90 degrees:
$ pdfcpu rotate --pages 1-2 test.pdf -90

Rotate streamed input and write the result to stdout:

$ aws s3 cp s3://acme-scans/batch.pdf - \
   | pdfcpu rotate --pages odd - 90 - \
   | aws s3 cp - s3://acme-scans/batch-rotated.pdf