
Then you can press / and search for -rotate. Or, even better, pipe to less: qpdf -help | less -RFX

To see the help options, run qpdf -help instead. QPDF User manual in HTML form: file:///usr/share/doc/qpdf/qpdf-manual.html.QPDF User manual in PDF form: file:///usr/share/doc/qpdf/qpdf-manual.pdf.You can also view the manual online here. Copy and paste them into your browser's address bar to open them. So, read the full manual which is stored locally on your computer! Here are the links. A complete manual can be found in /usr/share/doc/qpdf/qpdf-manual.html or /usr/share/doc/qpdf/qpdf-manual.pdf. Here's a key part right at the end of it (emphasis added):įor a summary of qpdf's options, please run qpdf -help. The manual pages ( man qpdf) show very little, but what they do show is very important. # Rotate in.pdf +/-180 deg and save as out.pdf # Rotate in.pdf -90 deg and save as out.pdf # Rotate in.pdf +90 deg and save as out.pdf Tested on Ubuntu 20.04 with qpdf version 8.0.2 (see qpdf -version), but I suspect it would work fine on Ubuntu 18.04, 16.04, and 14.04 too, since I've used qpdf in other ways on all of those systems as well.

In your case, to rotate all pages in a PDF 90 degrees clockwise, you can do: qpdf -rotate=+90 in.pdf out.pdf For example, the command qpdf in.pdf out.pdf -rotate=+90:2,4,6 -rotate=180:7-8 would rotate pages 2, 4, and 6 90 degrees clockwise from their original rotation and force the rotation of pages 7 through 9 to 180 degrees regardless of their original rotation, and the command qpdf in.pdf out.pdf -rotate=180 would rotate all pages by 180 degrees. Otherwise the pages' rotations are set to the exact value. If preceded by + or -, the angle is added to or subtracted from the specified pages' original rotations. The angle portion of the parameter may be either 90, 180, or 270. If the page range is omitted, the rotation is applied to all pages.

The page-range portion of the option value has the same format as page ranges in Section 3.5, “Page Selection Options”. You can use: qpdf in.pdf out.pdf -rotate=angle.Īpply rotation to specified pages.

In Linux Mint 18.3 (I believe in other Debian derived distributions as well) you have a simple command line tool named qpdf.
