^BQ
QR Code Bar CodePreview: partialDraws a QR code. The data field takes a mode prefix that is easy to get wrong and is a frequent source of unreadable symbols.
Syntax
^BQa,b,c,d,eParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| a | Field orientation. QR accepts normal only.N — the only orientation QR accepts | N |
| b | QR model. Model 2 is the current standard.1 or 2 — the QR model | 2 |
| c | Magnification — the size of one module, in dots.1 to 10 — dots per module | Chosen by the printer |
| d | Error-correction level.H 30%, Q 25%, M 15%, L 7% recovery | Q |
| e | Mask pattern. Leave it at the default and let the encoder choose.0 to 7 — mask pattern | 7 |
How it works
^BQ produces a QR code. Unlike the linear barcodes, its size comes from the magnification factor rather than from a height in dots: each module is drawn as a square of that many dots, so magnification 6 on a 203 dpi printer gives a symbol around 20 mm across for short data.
The data in ^FD is not the raw payload. It begins with a two-character prefix — an error-correction level and an input mode, as in QA, — followed by a comma and the content. Omitting that prefix is the usual reason a QR code prints but encodes the wrong thing.
The error-correction level trades size for robustness: H recovers from 30% damage but produces the largest symbol, L recovers 7% and produces the smallest. For labels that will be handled or scuffed, M or Q is a reasonable middle ground.
Example
^XA
^FO60,40^BQN,2,6^FDQA,https://zpltoolkit.com^FS
^XZRendering…
How the preview on this site handles it
Drawn with a real QR encoder, so the preview scans, and the data prefix is parsed. Magnification and error-correction level are honoured. The model, mask and orientation parameters are not applied.
Common mistakes
- Omitting the mode prefix in ^FD. 'hello' and 'QA,hello' produce different symbols.
- Magnification 1 or 2 on a 203 dpi printer. The modules are too small for most phone cameras.
- Choosing H for a long URL. The symbol grows quickly and may not fit the space you allowed.