layout
Packs multiple print items onto shared sheets with automatic rotation, crop marks, margins, and gaps, then outputs printable HTML files per paper group for proofing and printing.
Instructions
Automatically pack many items onto sheets (imposition) and write printable HTML, one file per paper group.
items: [{"name": "badge", "width_mm": 90, "height_mm": 55, "copies": 1, "group": "plain", "html": "<div ...>..." OR "src": "card.pdf" | "photo.jpg", "page": 1, "rotate": true, "fit": "fill"|"contain"}]
html: the item's design, filling its box (use position:absolute children, mm units, data-fit). Shared styles go into css. One entry per distinct item (e.g. one per guest), copies for identical ones.
src: a PDF page or image (e.g. a business card PDF from another tool), path relative to out's folder.
group: items that need different paper (cardstock vs plain) must have different groups; each group becomes its own file to proof and print with its own profile. sheet: A4, A3, A5, Letter, Legal, Tabloid or [width_mm, height_mm]. margin_mm: keep >= printer margin (~4). gap_mm: space between items (0 = shared cut lines). Items rotate automatically when that saves paper. out: .html path (or folder) for the result; must contain any src files. Returns files, sheet counts, paper use.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | ||
| out | No | ||
| items | Yes | ||
| sheet | No | A4 | |
| title | No | layout | |
| gap_mm | No | ||
| landscape | No | ||
| margin_mm | No | ||
| crop_marks | No |