Read more

Rotate a PDF under Ubuntu Linux

Henning Koch
August 24, 2011Software engineer at makandra GmbH

Use the PDF toolkit Show archive.org snapshot :

sudo apt-get install pdftk
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

To rotate page 1 by 90 degrees clockwise:

pdftk in.pdf cat 1E output out.pdf    # old pdftk
pdftk in.pdf cat 1east output out.pdf # new pdftk

To rotate all pages clockwise:

pdftk in.pdf cat 1-endE output out.pdf    # old pdftk
pdftk in.pdf cat 1-endeast output out.pdf # new pdftk

The E (old pdftk) or east (new pdftk) is meaningful if you want other rotations. From the man page:

The page rotation setting can cause pdftk to rotate pages and documents.
Each option sets the page rotation as follows (in degrees): north: 0, east: 90, south: 180, west: 270, left: -90, right: +90, down: +180. left, right, and down make relative adjustments to a page's rotation.

Posted by Henning Koch to makandra dev (2011-08-24 13:50)