#!/usr/bin/env python3
"""
-bookmaker.py is a helper for optimizing PDFs of books for the production of small self-printed, self-bound physical books Towards this goal it offers various PDF manipulation options that may also be used indepéndently and for other purposes.
+bookmaker.py is a helper for optimizing PDFs of books for the production of small self-printed, self-bound physical books. Towards this goal it offers various PDF manipulation options that may also be used indepéndently and for other purposes.
"""
import argparse
import io
(front) (back)
+-------+ +-------+
-| 4 | 1 | | 3 | 2 |
+| 4 | 1 | | 2 | 3 |
|-------| |-------|
-| 8 | 5 | | 7 | 6 |
+| 8 | 5 | | 6 | 7 |
+-------+ +-------+
To facilitate this layout, --nup4 also pads the input PDF pages to a total number that is a multiple of 8, by adding empty pages if necessary.