


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. "open the file in a PDF viewer, then rotate, then print using a PDF printer like cutePDF or PDF printer or etc".but then all the comments were very negative and stating "the image quality is ruined" "just use Adobe Acrobat Pro to rotate the file and then save the file".I tried searching and found a bunch of solutions but I had trouble finding what looked like an authoritative solution that uses a stable and robust Linux/Unix tool.įor example, here is a sampling of some of the haphazard solutions I found: When I scan documents that are landscape-oriented, the output PDF files are portrait and so all the PDF viewers display the scanned documents in portrait.įrom the command line, how do you rotate a PDF file 90 degrees?
