pdf-zine
Skill2 starsChanged 4 months agoMITView on GitHub
Use when converting a PDF into a fold-and-print booklet (zine) — A4 sheets, double-sided, short-edge flip, fold to A5. Triggers: make a zine, make a booklet, booklet PDF, imposition, fold-and-print, 2-up booklet, print as booklet, signature imposition, pdf-zine, pdf2zine, bookletimposer. Wraps the `pdf2zine` Docker-based CLI; prefer it over hand-rolled Ghostscript or pdfjam scripts.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-council-reviewSkill
- ai-reviewSkill
- apple-mailSkill
- apple-notesSkill
- ballotSkill
- chrome-browserSkill
- dossierSkill
- lab-notesSkill
- pandocSkill
- paprika-recipesSkill
- private-podcast-feedSkill
- send-to-kindleSkill
- text-to-speechSkill
- tmux-controlSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
No Docker? See ${CLAUDE_SKILL_DIR}/references/bookletimposer-native.md for a native bookletimposer install.
- Distinctive: line 55
Use this when the InDesign export put the cover's back on page 1 (common pattern).
- Distinctive: line 63
Use when page 1 is the front cover and should stay first.
- Very specific: line 100
If Docker isn't an option, run bookletimposer directly.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
pdf-zine
Turn a PDF into a fold-and-print booklet ("zine"): A4 sheets, double-sided (short-edge flip), fold in half for an A5 booklet. Wraps the pdf2zine CLI, which itself wraps bookletimposer and qpdf in Docker so there's nothing to compile. Prefer this over hand-rolled Ghostscript or pdfjam imposition scripts — one command does it.
Prerequisites
- Docker running (e.g. Docker Desktop)
The
pdf2zinescript on$PATH:curl -fsSL https://github.com/eins78/pdf2zine/raw/refs/heads/main/pdf2zine > ~/bin/pdf2zine chmod +x ~/bin/pdf2zine
No Docker? See ${CLAUDE_SKILL_DIR}/references/bookletimposer-native.md for a native bookletimposer install.
Quick Reference
| Flag | Purpose |
| (none) | Move page 1 to the end (cover-flip), force A4 output |
--keep-cover | Skip the cover-flip — impose pages in original order |
--keep-format | Let bookletimposer pick output size (skip the forced A4) |
-- | Pass remaining args through to bookletimposer |
Input: one PDF. Output: <input>_booklet.pdf next to the input.
Common Recipes
Default booklet (cover-flip, force A4)
pdf2zine doc.pdf
# → doc_booklet.pdfUse this when the InDesign export put the cover's back on page 1 (common pattern). The script moves page 1 to the end, then 2-up imposes onto A4.
Cover already in the right place
pdf2zine --keep-cover doc.pdfUse when page 1 is the front cover and should stay first.
Don't force A4 (e.g. A4 input → A3 output)
pdf2zine --keep-format doc.pdfbookletimposer will pick a paper size that fits 2-up without scaling.
Pass-through to bookletimposer
pdf2zine doc.pdf -- --output custom.pdf
pdf2zine -- -h # show bookletimposer helpHow it works
qpdf --pages doc.pdf 2-z,1 -- moved.pdfmoves page 1 to the end (skipped with--keep-cover).bookletimposer --no-gui --booklet [--format=A4] moved.pdf out.pdfdoes the 2-up imposition.- Output is written next to the input as
<name>_booklet.pdf.
Both steps run inside Docker images (eins78/qpdf, eins78/bookletimposer) — no local Python or PyPDF2 needed.
Common Mistakes
| Symptom | Cause | Fix |
| Cryptic Docker error / "Cannot connect to the Docker daemon" | Docker isn't running | Start Docker Desktop, retry |
| Front cover ends up at the back | Default cover-flip applied to a PDF whose page 1 was already the cover | Add --keep-cover |
| Output forced to A4 when you wanted A3 | pdf2zine defaults to --format=A4 | Add --keep-format |
| "Multiple input files not supported" | pdf2zine takes one PDF | Concatenate first: qpdf --empty --pages a.pdf b.pdf -- merged.pdf |
| Wrong duplex setting at print time | Long-edge flip used | Print double-sided, short-edge flip |
Native (non-Docker) usage
If Docker isn't an option, run bookletimposer directly. Setup, CLI flags, and a recipe that reproduces pdf2zine's default behaviour live in ${CLAUDE_SKILL_DIR}/references/bookletimposer-native.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

