Create an easy-to-print 8.5"×11" booklet (pamphlet) from a half-letter (8.5"×5.5") PDF.
This script automatically:
- 📄 Adds blank pages so the total page count is a multiple of 4
- 🔢 Reorders pages into proper booklet order (so they fold correctly)
- 🧩 Combines two half-sized pages into one landscape sheet
- 🔁 Optionally flips every second sheet by 180° for duplex printers that rotate the back side
The goal of this program is to enable local churches and individuals to easily print their own literature.
Install PyMuPDF (used for PDF layout and merging):
uv pip install pymupdfuv run pamphletize input.pdf output.pdf --flip-backPositional arguments:
input.pdf— Path to your original half-page PDFoutput.pdf— Path where the new booklet PDF will be saved
Optional flags:
--flip-back— Rotates every second sheet 180° for duplex printers that flip the back page upside-down
Once the script produces your output.pdf:
-
Open it in your PDF viewer.
-
Set print settings as follows:
- Double-sided: ✅ Enabled (
Flip on short edge) - Orientation: Landscape
- Scaling: Actual size (no scaling or fit-to-page)
- Paper size: Letter (8.5" × 11")
- Double-sided: ✅ Enabled (
-
Print, fold, and staple in the middle — you now have a perfect half-letter pamphlet.
For a 14-page input PDF (input.pdf):
- The script pads it to 16 pages (adding 2 blanks)
- Reorders pages into booklet sequence
- Merges pairs of half-pages into 8 full sheets
- Produces
output.pdf, ready for duplex booklet printing
# Make a booklet without rotation
uv run pamphletize input.pdf booklet.pdf
# Make a booklet where every second sheet is rotated 180°
uv run pamphletize input.pdf booklet.pdf --flip-back- Each sheet (8.5"×11") contains two 8.5"×5.5" pages, side by side.
- The resulting PDF is already arranged for booklet printing — no need to select "2 pages per sheet" in your print dialog.
- The
--flip-backoption is useful for printers that feed pages differently when duplexing (you can try both ways to see which aligns correctly).
uv run pamphletize "./assets/input.pdf" "./assets/output.pdf" --flip-back| Input | Output (Printed + Folded) |
|---|---|
- ChatGPT did a majority of the work.
You can copy, translate, modify, and distribute this resource, without restriction, and without needing to ask permission.
This resource is freely given (Matt 10:8) for the sake of the gospel.