@@ -6,11 +6,13 @@ import { fieldPos, fdFieldFor } from "./zplHelpers";
66import { type ZplRotation } from "./rotation" ;
77import { RotationSelect } from "../components/Properties/RotationSelect" ;
88
9- /** Maxicode is a fixed-physical-size 2D symbology (1.11" × 1.054"
10- * at standard scale, ~28 × 26 mm). Unlike QR or DataMatrix it has
11- * no per-module magnification — the printer always renders a
12- * single fixed size. Therefore no `commitTransform` and no
13- * magnification prop; only the data, mode, and rotation vary. */
9+ /** Maxicode is a fixed-physical-size 2D symbology. Per ISO/IEC
10+ * 16023 §4.11 the printed footprint is 28.14 × 26.91 mm at
11+ * standard module size (1.11 × 1.054 inch). Unlike QR or
12+ * DataMatrix it has no per-module magnification: the printer
13+ * always renders the same physical dimensions regardless of
14+ * dpmm. Therefore no `commitTransform` and no magnification
15+ * prop; only the data, mode, and rotation vary. */
1416
1517/** All modes the spec defines. Editor exposes every one and lets
1618 * bwip-js validate the (content, mode) pair on encode:
@@ -27,9 +29,6 @@ import { RotationSelect } from "../components/Properties/RotationSelect";
2729 * shown instead of an error. */
2830const ALL_MODES = [ 2 , 3 , 4 , 5 , 6 ] as const ;
2931
30- /** Default physical footprint of a Maxicode at 8 dpmm: spec is
31- * ~28 × 26.9 mm; converted to dots that's 224 × 216. */
32- const MAXICODE_DEFAULT_FOOTPRINT = { width : 224 , height : 216 } as const ;
3332
3433/** Mode 4 = standard symbol with arbitrary payload, the only mode
3534 * most users without UPS-domain knowledge can reach for without
@@ -52,10 +51,11 @@ export const maxicode: ObjectTypeDefinition<MaxicodeProps> = {
5251 mode : MAXICODE_DEFAULT_MODE ,
5352 rotation : "N" ,
5453 } ,
55- // Fixed-size symbol — the printer always renders at standard
56- // Maxicode dimensions, so the resize transformer is disabled
57- // (heightLocked) and no commitTransform is needed.
58- defaultSize : MAXICODE_DEFAULT_FOOTPRINT ,
54+ // Spec-fixed physical footprint per ISO/IEC 16023. Declared in
55+ // mm so the palette resolves to the active label's dpmm at drop
56+ // time; `heightLocked` then disables both transformer axes since
57+ // the symbology has no resize semantics.
58+ defaultSize : { widthMm : 28.14 , heightMm : 26.91 } ,
5959 heightLocked : true ,
6060
6161 toZPL : ( obj , ctx ) => {
0 commit comments