docs: print module in help page, llms.txt, README and changelog
This commit is contained in:
@@ -2,6 +2,40 @@
|
||||
|
||||
All notable changes to Klarbild are documented here. Newest first.
|
||||
|
||||
## 2026-08-18 — Print module: exact sizes, sheets & crop marks (no AI)
|
||||
|
||||
### Added
|
||||
- **Print module (`/druck`)** — a lab-style, completely AI-free path: crop, scale and place
|
||||
images at exact physical sizes. No model call, no cost, no queue.
|
||||
- **Interactive crop editor** — pan and zoom on a fixed target aspect ratio (rule-of-thirds
|
||||
overlay); the crop is stored relative (0..1) so it survives any source resolution.
|
||||
- **Size presets & free input** — biometric passport 35 × 45 mm, 2 × 3 / 3 × 4 / 4 × 5 / 4,5 × 6 cm,
|
||||
9 × 13 … 50 × 70 cm, squares, DIN. Free input understands `12x15` (cm), `35x45mm`, `5`
|
||||
(= 5 × 5 cm) and `4:3/15` (ratio + long edge).
|
||||
- **Sheet layout** — paper presets DIN A6–A2 incl. **A3+ (329 × 483 mm)**, photo-paper cuts
|
||||
(9 × 13 … 20 × 30), US Letter/Legal, plus any custom paper size. Portrait/landscape,
|
||||
printer margin, centering, per-image copy count.
|
||||
- **Automatic nesting** — identical sizes produce an exact grid; mixed sizes go through a
|
||||
MaxRects packer that fixes one orientation per format and tries every combination,
|
||||
so eight passport photos land in the free space next to the 13 × 18.
|
||||
- **Crop marks** — `corner` (fine 0.25 pt marks outside the trim box, Photoshop/InDesign
|
||||
convention, 4 mm long / 3 mm offset by default) or `grid` (continuous guides across the
|
||||
sheet that never cross another image). Gap between images adapts to the chosen marks.
|
||||
- **Bleed** (0–10 mm) — the image extends past the trim box, edge pixels are copied rather
|
||||
than stretched; the gap is always ≥ 2 × bleed so neighbouring bleeds cannot overlap.
|
||||
- **PDF output at 1:1** — the PDF page is exactly the sheet size (pdf-lib), with a footer
|
||||
stating the sizes, dpi and the "print at 100 %, not fit-to-page" reminder.
|
||||
- **Single export** — one image at an exact size as PNG/JPG with dpi metadata, plus a
|
||||
resolution warning when the source cannot hold the requested dpi.
|
||||
- **Sheet templates** — save the whole sheet setup (paper, marks, formats, counts) as a
|
||||
reusable preset (`print_presets`, migration `013`).
|
||||
- **All three entrances** — `/druck` in the web app, `📐 Druckbogen` in Telegram (fully
|
||||
button-driven, returns an A4 PDF), and the MCP tools `exact_size` / `print_sheet`.
|
||||
- **API** — `POST /api/print/single`, `GET /api/print/single?size=…` (mm → px calculator),
|
||||
`POST /api/print/sheet`, `GET|POST|DELETE /api/print/presets`. Documented in `/llms.txt`.
|
||||
- **Tests** — `tests/printlayout.test.ts` (`npm test`) covers size parsing, exact mm → px,
|
||||
non-overlap, margins, bleed spacing, mark geometry and multi-sheet paging.
|
||||
|
||||
## 2026-07-23 — Compose, generate & second backup
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user