^BQ generates a QR Code barcode — the ubiquitous 2D matrix code scannable by most smartphones and dedicated 2D scanners. QR Code can encode URLs, text strings, vCards, and arbitrary binary data, making it far more versatile than linear barcodes for consumer-facing labels.
The model parameter (b) selects between original QR (model 1, up to 1167 numeric characters) and enhanced QR (model 2, up to 7089 numeric characters). Model 2 is standard for modern use.
Magnification factor (c) scales the QR Code size. Each module (the smallest square element) is c × c dots. For a 203 DPI printer, c=3 gives 3-dot modules; c=5 gives 5-dot modules for larger codes.
Error correction (d) controls redundancy: L (7%), M (15%), Q (25%), H (30%). Higher error correction produces a larger code but allows scanning even when part of the code is damaged. Use H for labels that may get dirty or scratched.
The character mode parameter (e) is typically auto-detected — leave it as Q (auto) for most use cases.
Syntax
^BQa,b,c[,d,e]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| a | N | N | Orientation — currently only N (normal) is supported for QR Code. |
| b | 1 | 2 | 2 | Model: 1 = original QR Code, 2 = enhanced QR Code (standard for modern use). |
| c | integer (1–10) | 2 | Magnification factor — each module is c × c dots. |
| d | L | M | Q | H | Q | Error correction level: L = 7%, M = 15%, Q = 25%, H = 30%. |
| e | string | Q | Character mode (usually auto): A = auto, N = numeric, B = byte, K = Kanji. |
Examples
QR Code encoding a URL
Try in Viewer^XA ^FO50,50^BQN,2,4^FDQA,https://pryntaco.com^FS ^XZ
QR Code with high error correction
Try in Viewer^XA ^FO50,50^BQN,2,5,H^FDQA,Product ID: 98765^FS ^XZ
Common Mistakes
- !Forgetting the "QA," prefix in ^FD — the QR Code data must be preceded by the error correction selector and a comma (e.g., "QA," for automatic selection).
- !Setting c too small — at 203 DPI with c=1, each module is 1 dot (5 mil), too small for reliable smartphone scanning. Use c=3 or higher.
- !Choosing model 1 when model 2 is needed — model 1 has lower data capacity and is rarely required.