Skip to content

A short script to rotate all pages in a pdf file. It uses python with the argparse and pyPdf modules.

Notifications You must be signed in to change notification settings

cboittin/rotatePDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

A short script to rotate pdf files.
Uses python with the argparse and pyPdf modules.

Most pdf viewers allow to rotate pdf files, but only until you close the file.
This script writes a new pdf file from an existing one, applying a rotation to every page of the original.

Usage :

python rotatePdf.py [-h] [-angle ANGLE] [-direction DIRECTION] [-pages PAGES] input output

positional arguments:
input      Input pdf file
output   Output pdf file

optional arguments:
-h, --help          show this help message and exit
-angle ANGLE        Rotation angle in degrees. Default is 90.
-direction DIRECTION   One of clockwise or counterclockwise. Default is counterclockwise.
-pages          Python list (with enclosing [] and , separated) of page numbers, starting from 1. Default is all.  Example: [1, 7, 8, 13]

About

A short script to rotate all pages in a pdf file. It uses python with the argparse and pyPdf modules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages