Don’t you also get frustrated by that? You scan a landscape document into PDF and you need to rotate to have something readable. Or worse, a 50 page document and then find out that everything is upside down?
What to Do on Linux?
It is not late – we have PDFtk to fix our documents..
Many desktop Linux distributions have that as bundled. For CentOS, RHEL or Oracle Linux, there are binaries available. Below example is to install pdftk-2.02-1.el6.x86_64.rpm on the command line:
# rpm -ivh pdftk-2.02-1.el6.x86_64.rpm Preparing... ################################## [100%] 1:pdftk ################################## [100%] #
for other cases, you can get the source code and build it.
How to Use PDFtk?
Assume 06.pdf has 1 page and it is upside down. Do below to rotate 180 degrees:
$ pdftk 06.pdf rotate 1south output rotated_06.pdf $
Consider 07.pdf is a 3 landscape page documents where we need to rotate 90 degrees counter-clockwise. See below:
$ pdftk 07.pdf rotate 1-3west output rotated_07.pdf $
Want to know more? Check the website and also rely on pdftk manpage
$ man pdftk
So simple. It is not magic. It is PDFtk 🙂