pdfrotate [ file.pdf ]
The pages of the given file.pdf file are selected/rotated as specified interactively in the Command: input field and saved to file (#).pdf where # is a number. The number is increased until there is no file found with the resulting file name.
The page rotation/selection has to be specified as a list of following entries (see also: EXAMPLES section):
{ BEGIN_PAGE[-END_PAGE[qualifier]][rotation] }
Where:
A special page number is end which represents the last page of the document.
Be aware, that if yo want to rotate for example page number 5 by +90 degrees, you have to select all other pages also, else pdfrotate creates a document containing only the rotated page 5.
Therefore the command to rotate page 5 in a document is:
1-4 5R 6-end
L
= rotation by -90 degrees (rotate to the
Left)
R
= rotation by +90 degrees (rotate to the
Right)
D
= rotation by +180 degrees (rotate
Down)
The pdfrotate command should be installed to the 'Send To' context menu in 'Microsoft™ Windows Explorer' for most convenient usage. To do so, invoke pdfrotate -i once.
If no file is specified, you are queried to select a file by an open file box dialog where you then can select the file to be processed.
Copy this file to your working directory and play around with the possibilities of the pdfrotate command.
Select only the page 6 of the PDF file:
6
Select only the pages 5 and 10 of the PDF file:
5 10
Select pages 1 to 5 and 10 to the end of the PDF file:
1-5 10-end
Select pages 1 to 5, page 7 and 10 to the end of the PDF file:
1-5 7 10-end
Select pages 1-10 in a reverse order from page 10 to 1:
10 9 8 7 6 5 4 3 2 1
1-endN
If you scanned a document, the scanner might rotate some pages because it "thinks" that the contents are written in an other direction (e.g. landscape) in contrast to the rest of the document (e.g. portrait).
To get a document where all pages are upright (portrait) try to rotate all pages North as shown in this example is often a good first intent.
Do not rotate pages 1-3, rotate pages 4-5 to 90 degrees clockwise (to East), page 6 to 180 degrees (to South), page 7 to 270 (to West) and do not rotate pages 8 to the end of the file:
1-3 4-5E 6S 7W 8-end
or:
Do not rotate pages 1-3, rotate pages 4-5 by 90 degrees to the right, page 6 by 180 degrees, page 7 by 90 degrees to the left and do not rotate pages 8 to the end of the file:
1-3 4-5R 6D 7L 8-end
Note: The two commands seam to be identical, but the result might be different based on the program (or scan) that created the PDF file (see also: explanation of example 4).
split
For more information about pdftk , see: https://www.pdfhacks.com/pdftk/ .
This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.