2.1 KiB
Web Label-Sheet Generation
Status: first increment implemented. The web UI can generate QR-code label-sheet PDFs for one or more selected nodes using a built-in US Letter 3 × 10 template, choose a starting label position, and preview every output page.
The template catalog now supports Letter, A4, and custom page sizes; generic physical templates with manufacturer compatibility aliases; editable custom geometry; fit validation; and persisted template selection. Initial aliases cover Avery 5160/8160/18160, 5161/8161, 5163/8163, and A4 L7160 geometries.
Build a generic adhesive label-sheet generation system for the web UI, independent of Avery or any other manufacturer.
Core architecture
interface LabelSheetTemplate {
name: string;
pageWidthMm: number;
pageHeightMm: number;
rows: number;
columns: number;
labelWidthMm: number;
labelHeightMm: number;
marginTopMm: number;
marginLeftMm: number;
horizontalGapMm: number;
verticalGapMm: number;
cornerRadiusMm?: number;
bleedMm?: number;
}
Use deterministic placement:
x = marginLeft + col * (labelWidth + horizontalGap)
y = marginTop + row * (labelHeight + verticalGap)
Keep these concerns separate:
LabelDesign = content/layout of one label
LabelSheetTemplate = physical geometry of the sheet
PrintJob = data + selected labels + occupied/unused positions
Requirements
- Arbitrary manufacturer sheet dimensions
- Letter, A4, and custom page sizes
- Start-at-label and skip-used-label positions
- Printer calibration offsets and optional scaling
- PDF generation using physical units
- Printing at 100% / Actual Size
- Text, QR codes, barcodes, images, lines, and rectangles
- Validation that rows and columns fit within the page
- Preview before printing
Target workflow
Select structured inventory data
→ choose label design
→ choose sheet template
→ choose available sheet positions
→ preview
→ generate PDF
→ print
The goal is to provide useful label-sheet design and printing while remaining completely manufacturer-independent.