Repository navigation
feat(preview): show print orientation (^PO) and mirror (^PM) as printed - #9
Merged
Merged
Conversation
The Preview window opens on "As printed" for a label set to ^POI or ^PMY, explains why the picture is turned and offers an "As designed" switch. The renderer flips the whole label inside LabelRenderer.Draw; only LabelDocumentAdapter.AsPrinted sets it, so the canvas and PNG/JPEG/PDF exports stay as designed. The status bar names a label that prints upside down or mirrored. Adds renderer pixel tests, importer round-trip tests, a golden file and view-model tests; marks ^PO and ^PM as previewed in the command catalogue.
pt-BR and fr-CA for the 14 keys of the As printed / As designed preview and the status bar note.
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-localization
to
main
October 24, 2026 14:37
glenntosco
added a commit
that referenced
this pull request
Oct 27, 2026
feat(preview): show print orientation (^PO) and mirror (^PM) as printed
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 13. Stacks on the pt-BR/fr-CA PR (→ #7 → #6 → #5). Merge in order.
The Preview window now shows a label the way the printer puts it on the media when it is set to print upside down (
^POI) or mirrored (^PMY). It opens on "As printed", says in one sentence why the picture is turned, and has an "As designed" switch. The design canvas stays upright for editing; the status bar names the difference ("Prints upside down" / "Prints mirrored").RenderLabel.Inverted/Mirroredflip the whole drawing about the label centre inLabelRenderer.Draw. OnlyLabelDocumentAdapter.AsPrintedsets them;ToRenderLabelstays upright.PreviewViewModel(switch, note, redraw event),PreviewCache.RenderPrinted(..., asPrinted), switch row shown only for ^POI / ^PMY labels, status-bar badge.docs/decisions.md).^PMwas already modelled (MirrorImage), so it is previewed the same way. Import of^POI/^PON/^PMYalready worked; now covered by tests.^PO/^PMpreview set to Exact;docs/zpl-coverage.mdregenerated.How it was tested
PrintOrientationPreviewTests: pixel-for-pixel 180° turn, mirror and both; block position at scale 1 and 2; adapter only flips throughAsPrinted; PNG export stays upright; import of^POI,^POi,^PON, none; inverted + mirrored round trip; new goldenlabel_print_inverted.zpl.PreviewViewModelTests: defaults, redraw and change notifications, note text for each case, radio write-back of false does not flip the choice, bitmap bounds, no switch for a normal label, status badge, canvas stays upright.Checklist
CHANGELOG.mdupdatedNotes
Generated by Claude Code