Sample Header Ad - 728x90

Command line: How do you rotate a PDF file 90 degrees?

206 votes
11 answers
178686 views
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. **From the command line, how do you rotate a PDF file 90 degrees?** 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. ---- footnote For example, here is a sampling of some of the haphazard solutions I found: - "just use Adobe Acrobat Pro to rotate the file and then save the file" - "use pdfjam" - "use PDFtk" - "use ${PROGRAM_NAME} from Poppler" - "use ImageMagick's convert" -- but then all the comments were very negative and stating "the image quality is ruined" - "open the file in a PDF viewer, then rotate, then print using a PDF printer like cutePDF or PDF printer or etc" - "use ${PROGRAM_NAME}", then I searched for "${PROGRAM_NAME}" and there is something about "Fedora removed ${PROGRAM_NAME} because of licensing issues"
Asked by Trevor Boyd Smith (4181 rep)
Sep 24, 2017, 12:19 AM
Last activity: Feb 22, 2025, 04:36 PM