Useful PDFtk Commands
All commands can be found by running man pdftk
from the
terminal, or visiting the PDFtk
Server Manual
web-page.
Rotation
Rotate all pages 90 degrees clockwise:
pdftk <in.pdf> cat 1-endeast output <out.pdf>
Rotate all pages 90 degrees counter-clockwise :
pdftk <in.pdf> cat 1-endwest output <out.pdf>
Rotate all pages 180 degrees:
pdftk <in.pdf> cat 1-endsouth output <out.pdf>
Rotate a specific page 90 degrees clockwise (e.g. page 7):
pdftk <in.pdf> cat 7east output <out.pdf>
Rotate a specific page 90 degrees while keeping other pages:
pdftk <in.pdf> cat 1-3 4east output <out.pdf>
Rotate a specific page (relative to final page) 90 degrees clockwise (e.g. the third to last page):
pdftk <in.pdf> cat r3east output <out.pdf>
Rotate a consecutive page range 90 degrees clockwise (e.g. pages 4 through 9):
pdftk <in.pdf> cat 4-9east output <out.pdf>
Rotate every odd page in a consecutive page range 90 degrees clockwise (e.g. page 5, 7 and 9):
pdftk <in.pdf> cat 4-9oddeast output <out.pdf>
Rotate every even page in a consecutive page range 90 degrees clockwise (e.g. page 4, 6 and 8):
pdftk <in.pdf> cat 4-9oddeast output <out.pdf>