Skip to content

Take a PDF file as a input, and split it in a sequence of PDFs of size between 16 to 32, that might be printed as booklets

License

Notifications You must be signed in to change notification settings

fanchuo/booklet_splitter

Repository files navigation

Booklet splitting tool

codecov Build pass

For a given large PDF file, bind a book.

Installation

On your python environment, just issue this pip install command:

pip install booklet_splitter

Usage

usage: booklets [-h] [--max_size MAX_SIZE] [--log LOG] [--targetdir TARGETDIR] [--no-layout] [--cover] input_pdf

For a given pdf, builds booklets to be printed, folded and eventualy assembled as a book

positional arguments:
  input_pdf             PDF file to be sliced as booklets

optional arguments:
  -h, --help            show this help message and exit
  --max_size MAX_SIZE   Max size for a booklet, must be multiple of 4
  --log LOG             Log level at execution
  --targetdir TARGETDIR
                        Directory where the booklets PDF are written
  --no-layout           Only splits your document in booklets
  --cover               Adds a page at the very beginning and at the very end, to paste a cover

Useful commands to print pdf files

For a given pdf, print odd/even pages:

lpr -o page-set=odd <file>
lpr -o page-set=even <file>

For a given pdf, print recto/verso

lpr -o sides=one-sided <file>
lpr -o sides=two-sided-long-edge <file>
lpr -o sides=two-sided-short-edge <file>

Print black and white

lpr -o saturation=percent <file>

About

Take a PDF file as a input, and split it in a sequence of PDFs of size between 16 to 32, that might be printed as booklets

Resources

License

Stars

Watchers

Forks

Packages

No packages published