- Pdftk Installation
sudo apt-get install pdftk
For RPM-based distributions, you can find how to install Pdftk here.
- Rotating a PDF Document by 90 Degrees
pdftk input-file.pdf cat 1E 2-end output output-file.pdf
Replace "input-file.pdf" with the name of the PDF file you want to rotate by 90 degrees. "output-file.pdf" is the name of the PDF file that will be rotated, you can give it another name.
- Rotating a PDF Document by 180 Degrees
pdftk input-file.pdf cat 1-endS output output-file.pdf