Plain English

Draws a QR code at the specified position. You control the error correction level, cell size, encoding mode, and rotation. QR codes can store URLs, text, and other data.

When to use

When you need a 2D barcode that can be scanned with a smartphone — URLs, asset IDs, or compact data encoding.

Syntax

QRCODE x,y,ECC,cell,mode,rotation,"data"

Parameters

ParameterDescription
x
Horizontal position in dots
y
Vertical position in dots
ECC
Error-correction level — higher recovers more of the symbol if damaged.
  • L - ~7% recovery
  • M - ~15% recovery (typical default)
  • Q - ~25% recovery
  • H - ~30% recovery
cell
Cell size in dots (1–10)
mode
Encoding mode
  • A - Automatic — encoder picks numeric / alphanumeric / byte / kanji
  • M - Manual mode selection (legacy firmware)
rotation
Rotation in degrees
  • 0 - No rotation
  • 90 - 90° clockwise
  • 180 - 180° (upside down)
  • 270 - 270° clockwise
data
The data to encode (in double quotes)

Example

QRCODE 50,50,M,5,A,0,"https://rfid.me"

QR code linking to rfid.me

Glossary entry

Try it in the playground View all TSPL commands