Sign In
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutionsAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›ZPL Lint Rules›ZPL4008

ZPL4008 — QR code prints lower than its ^FO position

A QR code (^BQ) positioned with ^FO does not start at the ^FO y value. The printer adds the current ^BY bar height to it, so the symbol's top edge lands at y plus that height. ^BY is normally written for a linear barcode earlier on the label and stays in effect, even across ^XA, until another ^BY replaces it; a QR code that follows inherits the offset. Measured on a Zebra GK420d: with a ^BY height of 50 the code printed about 50 dots lower, with 200 about 200 dots lower. When no ^BY height was ever given the printer's power-on value of 10 dots applies and the rule stays silent. The preview applies the same offset inside one label format; a ^BY height carried over from an earlier format (^XA…^XZ) is applied by the printer but not by the preview, which draws each label on its own. ^FT positioning follows a different rule and is not covered.

SeverityInfo
CategoryBarcodes

Label that triggers it

^XA^FO50,50^BY3,2,80^BCN,80,Y,N,N^FD12345678^FS^FO50,220^BQN,2,6^FDQA,https://example.com^FS^XZ

Finding: ZPL4008 · line 1:57 — ^BQ placed with ^FO prints 80 dots lower than the ^FO y value: the printer adds the current ^BY bar height to a QR code's position. Put ^BY2,3,10 right before ^BQ and set ^FO y to the wanted top edge minus 10

Open the broken label in the editor →

How to fix it

Write ^BY2,3,10 immediately before ^BQ so the offset is a known 10 dots, and set the ^FO y value to the top edge you want minus 10. Linear barcodes that follow need their own ^BY again. The corrected example keeps the QR code in the same place: the original printed at 220 + 80 = 300, the corrected one at 290 + 10 = 300.

Corrected label

^XA^FO50,50^BY3,2,80^BCN,80,Y,N,N^FD12345678^FS^FO50,290^BY2,3,10^BQN,2,6^FDQA,https://example.com^FS^XZ

Open the corrected label in the editor

Commands involved

^BQ · ^BY · ^FO

ZPL4001 Barcode without data · ZPL4002 EAN-13 data is not 12–13 digits · ZPL4003 GS1 data without GS1 mode (no FNC1) · ZPL4004 GS1 check digit is wrong · ZPL4005 GS1 AI value has the wrong length · ZPL4006 GS1 check digit set by the printer · ZPL4007 Non-ASCII character in Code 128 data

In CI

npx labelixa validate "labels/**/*.zpl" lints your files and prints this page's address next to each finding. /docs/cli

Lint your ZPL now