Repository navigation
feat: label sheet layouts for office printers (multi-up PDF export) - #10
Merged
Merged
Conversation
A UI-free model of label sheets for office printers (paper, margins, label size, grid, pitch), validation with message keys, a small set of generic Letter and A4 templates described by their dimensions, and the imposition that fills sheets in order with a start position.
MergeBatch labels and LabelPrintRun now expose the resolved values of every label (same record iteration and serial numbers as the ZPL), and the renderer can draw a label from those values without resolving counters again. SheetExporter places the labels on sheets at their physical size and writes one PDF page per sheet, with optional crop marks or outlines.
An optional root "sheet" object; older builds ignore it, so it does not raise the format version. A section that makes no sense is dropped.
File > Export > Label sheets (PDF) and a button in the Print dialog open a dialog to pick a generic sheet template or type a custom layout, see the positions, start at a later position on a partly used sheet and save the labels (or the ticked records) as a PDF at the sheet's real size. Serial numbers are reserved and confirmed as for printing; the chosen layout is saved with the label. English and Spanish texts.
pt-BR and fr-CA for the 66 keys of the Label sheets dialog, its enums and its layout checks.
The main window applies the saved language when it opens, which put the test back in English before the sheet dialog built its template names.
glenntosco
force-pushed
the
claude/project-thread-5e0lug-sheet-layouts
branch
from
October 24, 2026 14:15
a31abde to
d2a5ed4
Compare
glenntosco
force-pushed
the
claude/project-thread-5e0lug-print-orientation
branch
from
October 24, 2026 14:15
c90ef3a to
759552b
Compare
glenntosco
changed the base branch from
claude/project-thread-5e0lug-print-orientation
to
main
October 24, 2026 14:43
glenntosco
added a commit
that referenced
this pull request
Oct 27, 2026
feat: label sheet layouts for office printers (multi-up PDF export)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Glenn · project thread
What changed and why
Assessment item 17 (on the roadmap). Last in the stack, on the ^PO preview PR. Merge in order.
Print labels on laser or inkjet label sheets. File > Export > Label sheets (PDF), or Label sheets in the Print dialog, opens a dialog to pick a generic sheet template or type a custom layout, see where each label goes, start at any position on a partly used sheet, add crop marks or outlines, and save a multi-page PDF at the sheet's real size with every label at its physical size. Data merge records, copies and serial numbers behave exactly as when printing. The layout is saved with the label.
Rotula.Core.Sheets):SheetLayout(paper Letter/A4/Legal/custom, margins, label size, grid, pitch, in mm) withIssue.Sheet.*validation keys;SheetTemplates(16 generic Letter/A4 layouts named only by dimensions; a sheet stock from the stock library opens on its matching template without showing a brand);SheetImposition(lazy fill, row or column order, start position).MergeBatch.Labelsnow carries resolvedValuesandCopies;LabelPrintRun.LabelValues()gives one set per copy so each copy gets its own serial;LabelDocumentAdapter.ToRenderLabelResolveddraws those values without re-running counters.SheetExporter.SavePdf, one page per sheet, labels centred and clipped to their position, text and barcodes stay vector, temp file then move, an empty run writes nothing.sheetsection; older builds ignore it, so no format version bump. Start position is deliberately not saved.SheetLayoutViewModel/SheetLayoutWindow(light theme), click a position to set the start, mm/in units. Serial numbers are reserved before the PDF is written and confirmed only when the file is complete.How it was tested
SheetLayoutTests: positions in mm and points (Letter 30-up, A4 24-up, 21-up), column order, centred grid, every template valid, stock matching, every validation key, start position, page breaks, merge records carrying serials and copies across sheets,LabelValuesconfirm/cancel, PDF page count and size (Letter exactly 612 × 792 pt), placement and physical size, empty run, temp file, serializer round trip.AppSheetLayoutTests: template suggestion, custom edits, validation blocking export, units, start position, single-label and merge exports with serials used once, nothing ticked, layout saved and reopened, Print dialog button, translated texts.Checklist
CHANGELOG.mdupdatedNotes
Generated by Claude Code