Monday, October 1, 2012

Rotate a PDF in Linux (and Other Fun Activities) - pdftk

For those of you who have ever needed to manipulate a PDF in Linux, I highly recommend pdftk, I've had great luck with it. Here's the best way to rotate a PDF:



sudo apt-get install pdftk

To rotate page 1 by 90 degrees clockwise:

pdftk in.pdf cat 1E output out.pdf

To rotate all pages clockwise:

pdftk in.pdf cat 1-endE output out.pdf

The page rotation setting can cause pdftk to rotate pages and documents. Each option sets the page rotation as follows (in degrees): N: 0, E: 90, S: 180, W: 270, L: -90, R: +90, D: +180. L, R, and D make relative adjustments to a page's rotation.



Unabashedly stolen from here.

No comments:

Post a Comment