feat: oversize sheets, image duplication, free labelling and a new layout

Prints larger than the sheet no longer just fail. Each cell can now spill over
the whole sheet (20x30 on A4 loses exactly 3 mm, and says so beforehand) or be
tiled across several sheets with a dashed glue fold and a sheet number. The
maths lives in printoversize.ts, dependency-free, so the browser preview and the
server PDF compute the same thing -- including the note strip that keeps the
sheet number off the picture.

The same image can now appear as several cells, so a portrait can be printed at
two sizes on one sheet without copying and re-uploading the file. The footer
line can be switched off, given custom text and placed at one of six positions;
it is only drawn where that edge is free.

Layout reworked for all three widths: work left, sticky preview right on the
desktop, collapsed setting groups paired in a two-column grid that expands full
width; preview first and a fixed action bar on the phone. Verified at 390, 820,
1440 and 1680 px -- no horizontal overflow, no dead white space.

Also a public presentation page at /vorstellung (no login, nothing operable),
whose sample sheet is computed by the real packer rather than drawn.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BNhLunz586g6DeYMa7Qsd1
This commit is contained in:
2026-08-20 10:55:11 +00:00
parent aeea706eb6
commit 5ebe8026e0
12 changed files with 1759 additions and 499 deletions
+41
View File
@@ -2,6 +2,47 @@
All notable changes to Klarbild are documented here. Newest first.
## 2026-08-20 — Oversize sheets, duplicate images, free labelling, new layout
### Added
- **Prints larger than the sheet.** The everyday case is 20 × 30 cm on A4 photo paper, where
exactly 3 mm are missing. Instead of refusing, each cell now offers two ways out
(`src/lib/printoversize.ts`, dependency-free like `printlayout.ts` so browser and server compute
the same thing):
- `overflow` centres the piece on the **whole sheet**, not the printable area — otherwise you
throw away the margin a borderless printer can actually use. How much is lost per side is
computed up front and shown before printing.
- `tile` splits the piece across several sheets. Tiles overlap by a glue fold (10 mm by default),
printed on both neighbours and marked with a dashed line. Each sheet carries its number, row
and column. 30 × 40 cm on A4 → 2 × 2 sheets.
Verified by rasterising the PDFs at 254 dpi: the overflow case measures 200,1 mm wide at x = 5 mm
and bleeds off both long edges; the tiles measure 200 × 286 and 110 × 124 mm, overlapping by 10.
- **Duplicate an image.** The same picture can now appear as several cells and be printed in two
different sizes on one sheet. Previously you had to copy the file, rename it and upload it again.
- **Configurable label.** The footer line can be switched off, given custom text, and placed at one
of six positions. It is only drawn if that edge is actually free — it never lands on a picture.
- **Public presentation page** at `/vorstellung` (no login, nothing operable). The sample sheet on it
is not a drawing: it runs the real packer at render time, so it follows the algorithm.
### Fixed
- **The tile number overlapped the picture.** The sheet number is printed at 8 pt from 3 mm off the
top edge, which needs about 6 mm — with a 5 mm paper margin it ran 0,8 mm into the motif.
`noteInset()`/`tileSheet()` now shift the tile down by the shortfall and shorten the sheet by the
same amount, so nothing sticks out at the bottom. Both the browser preview and the PDF call the
same helper, so the previewed sheet count cannot drift from the printed one.
### Changed
- **Desktop layout.** Work on the left, preview on the right, and the preview column is sticky so it
follows along — no more endless column next to an empty one. Setting groups sit collapsed side by
side in a two-column grid and expand across the full width, so three-way switches keep their
labels instead of being squeezed to 50 px.
- **Mobile layout.** Preview first, "Druck-PDF erzeugen" as a fixed bar above the tab navigation,
each image row showing thumbnail and controls side by side, touch targets at 3840 px, and the
remove button moved onto the thumbnail so it stops covering the format dropdown. The step numbers
("1 ·", "2 ·") are hidden below 1080 px, where the preview comes first and the numbers would lie.
- Advanced setting groups (margins, quality, labelling, delivery) start collapsed — their summary
line already says what is set.
## 2026-08-18 (4) — Renamed to "Drucken", 86 sizes, crop editor fixed
### Fixed