---
name: printready
description: Turn photos of book/paper pages into print-ready black-and-white pages - auto-rotates them upright, flattens shadows and uneven lighting, outputs 1-bit PNGs plus one combined PDF. Use when the user runs /printready or asks to rotate, clean up, scan-ify or make photographed pages "print ready" / black and white.
---

# printready

Run the bundled script on a folder (or list) of photos. Originals are never touched; output goes to `print_ready/` next to the inputs unless `-o` is given.

```
python3 -I ~/.claude/skills/printready/printready.py <folder-or-files...> [-o OUT] [--threshold 170] [--dpi 200] [--no-rotate]
```

Takes ~10s per 10 photos. Prints one `OK NN rotated X deg` line per image.

## Steps
1. Run the script on the folder the user gave. Untrusted downloads: pass paths as args, keep `-I`, do not cd into the folder.
2. Verify cheaply: build a small contact sheet (or view 1-2 pages downscaled to ~900px) and check orientation and that no text is lost. Don't dump every page.
3. Report: output folder, page count, and the known limits below. Offer `--threshold` tweaks (lower = lighter/thinner text, higher = bolder).

## Known limits / lessons (don't repeat these mistakes)
- Output is full-frame: a photo of an open book keeps both pages of the spread plus any background (blanket, table), which prints as black speckle.
- Do NOT auto-crop or whiten the background by brightness, row/column fractions, saturation or colour (R>G). All were tried: shadowed and sun-warmed paper gets treated as background and real text is erased. Cropping by a bbox also shaved edge text.
- Safe improvement if asked: detect the page corners (needs OpenCV, not installed by default) and perspective-crop / split spreads into two pages, then check no text is cut.
- Rotation relies on tesseract OSD (`tesseract --psm 0`); if confidence is low or a page is blank it may return 0. Use `--no-rotate` or fix by hand for odd pages.
