How to rotate pdf files with pdftk tool

root's picture

As usual, not going to write too much here but give you exactly what you need.

To rotate the first page from a pdf 90 degrees clockwise:
$ pdftk in.pdf cat 1E output out.pdf
To rotate all pages from a pdf 90 degrees clockwise:
$ pdftk in.pdf cat 1-endE output out.pdf
To rotate all pages from a pdf 90 degrees counter clockwise:
$ pdftk in.pdf cat 1-endL output out.pdf

The E is meaningful. 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.
END?

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root