Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/registry/aztec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { RotationSelect } from "../components/Properties/RotationSelect";
export interface AztecProps {
content: string;
magnification: number; // 1–10, module size in dots
ecLevel: number; // 0 = auto, 1–99 error correction percentage, 201232 for layers
ecLevel: number; // 0=default, 1-99=error correction %, 101-104=compact, 201-232=full, 300=rune
rotation: ZplRotation;
}

Expand All @@ -26,11 +26,12 @@ export const aztec: ObjectTypeDefinition<AztecProps> = {

toZPL: (obj) => {
const p = obj.props;
// ^B0{orientation},{magnification},{ecic},{menuSymbol},{numberOfSymbols},{structuredID}
// Also ^BO (alternate) — we use ^B0 as canonical
// ^B0 a,b,c,d,e,f,g = orientation, magnification, ecic, errorControl,
// menuSymbol, numberOfSymbols, structuredID. ecLevel=0 is Zebra's
// documented default for errorControl, so emitting it as-is is valid.
Comment thread
u8array marked this conversation as resolved.
return [
fieldPos(obj),
`^B0${p.rotation},${p.magnification},N,N,N,N`,
`^B0${p.rotation},${p.magnification},N,${p.ecLevel}`,
fdField(p.content),
].join("");
},
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/labelary_images/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
},
{
"id": "barcode_aztec_standard",
"zpl_input": "^XA^FO50,50^B0N,4,N,N,N,N^FDAztec123^FS^XZ",
"zpl_input": "^XA^FO50,50^B0N,4,N,0^FDAztec123^FS^XZ",
"expected_bounds": {
"x": 50,
"y": 50,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/testCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const testCases: TestCase[] = [
},
{
id: "barcode_aztec_standard",
zpl_input: "^XA^FO50,50^B0N,4,N,N,N,N^FDAztec123^FS^XZ",
zpl_input: "^XA^FO50,50^B0N,4,N,0^FDAztec123^FS^XZ",
expected_bounds: { x: 50, y: 50, width: 100, height: 100 },
image_ref: "barcode_aztec_standard.png",
},
Expand Down