How to rotate PDF?
Exactly! Sometimes you need to quickly flip a PDF by 90 or 180 or any number of degrees. And what is this PDF? Portable Document Format – a file format used for presenting, transferring and printing text and graphic content, which was created and promoted by Adobe Systems. How to turn it quickly and permanently? There are online converters, but they have limits on file size, and you also have to send your file online, and often sending a file using a slow connection takes ages. While the download speed is usually high, the upload speed is unfortunately not the same and is very, very low. When we don’t have time and want to do it and get the result immediately, Linux PDFTK comes to our aid. How to permanently rotate PDF? Let’s use an example, we have an Internet publication with a file size of over 100MB, which we open at least several times a day. Sending it to an online converter will take forever, and as I mentioned, online converters have a limit of accepted data of up to 100MB. Our favorite publication in the file is upside down, either because someone scanned it incorrectly or created a document with our PDF with the wrong page orientation. We need to click “View” then “flip” and then we can read. After closing the file, you have to repeat this action again – it becomes very irritating in the long run. Even if we reverse and save the PDF under a different name, after running the newly saved file, the problem is still unsolved.
We start to reverse the file and install PDFTK with the following command:
sudo apt-get install pdftk
To rotate a PDF 1 degree clockwise:
pdftk plik.pdf cat 1E output plik_obrocony.pdf
To rotate all pages clockwise:
pdftk in.pdf cat 1-endE output out.pdf
More about PDFK and PDF rotation
The “E” parameter is wildcard if you need other rotations. See MAN:
By setting page rotation options, we can force pdftk to rotate entire pages and documents. Each option sets page rotation parameters for our needs. The rotation value is in degrees: N: 0, E: 90, S: 180, W: 270, L: -90, R: +90, D: +180. L, R, and D realize relative adjustment to the page orientation.
More options:
pdftk --help
I wish you successful PDF rotations!