pdfrotate

Package: WA2L/WinTools 1.2.08
Section: General Commands (1)
Updated: 22 August 2018
Index Return to Main Contents

 

NAME

pdfrotate - rotate/select page(s) of a PDF file

 

SYNOPSIS

WA2LWinTools/bin/pdfrotate [ -h | -i | -u | -V ]

pdfrotate [ file.pdf ]

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

Rotate and/or select page(s) of a PDF file and produce a new single PDF file containing the rotated/selected pages of the source file.

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:

BEGIN_PAGE
Page number where to start the selection.

END_PAGE
Page number where to stop the selection.

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 

qualifier
even = even pages
odd = odd pages

rotation
N = rotation to 0 degrees (rotate to North)
E = rotation to 90 degrees (rotate to East)
S = rotation to 180 degrees (rotate to South)
W = rotation to 270 degrees (rotate to West)

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.

 

OPTIONS

-h
usage message.

-i
install the pdfrotate command as menu point 'pdfrotate' to the 'Send To' context menu in 'Windows Explorer'.

-u
uninstall the pdfrotate shortcut from the 'Send To' context menu in 'Windows Explorer'.

-V
print program version.

file.pdf
PDF file whose pages should be selected/rotated. When installed in the 'Send To' menu the selected file in 'Windows Explorer' is passed to the pdfrotate command, is processes and saved as a separate PDF file.

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.

 

ENVIRONMENT

-

 

EXIT STATUS

0
no error.

1
resulting file could not be created.

2
selected file does not exist.

4
usage message displayed.

5
program version printed.

6
no file selected.

 

FILES

var/cache/pdfrotate/command
last command entered into the Command: input field.

lib/pagenumbers.pdf
test file containing numbered pages.

Copy this file to your working directory and play around with the possibilities of the pdfrotate command.

 

EXAMPLES

1) Select a single page only:

Select only the page 6 of the PDF file:

6

2) Select certain pages only:

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

3) Change order of certain pages:

Select pages 1-10 in a reverse order from page 10 to 1:

10 9 8 7 6 5 4 3 2 1

4) Rotate pages to 0 degrees (= rotate to North):

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.

5) Rotate different pages to different directions:

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).

6) Split entire PDF file into individual pages:

split

 

SEE ALSO

wintoolsintro(1), config(1m), pdfconcatenate(1), pdftk(3), pdftkbuilder(1), https://www.pdfhacks.com/pdftk/

 

NOTES

The pdfrotate command uses internally pdftk, the PDF toolkit by Sid Steward.

For more information about pdftk , see: https://www.pdfhacks.com/pdftk/ .

 

BUGS

If more then one file.pdf is selected, only the first one is processed, because it is assumed that the chosen command might not be valid for more then one input file.

 

AUTHOR

pdfrotate was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2020 Christian Walther

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.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:32:38 GMT, September 14, 2024