
Thermal Printer Technical Manual
56
GS Z n Select 2-D code type
[Name] Select 2-D code type
[Format]
ASCII
GS
Z
n
Hex
1D
5A
n
Decimal
29
90
n
[Range]
0 ≤n ≤ 2
[Description]
Select 2-D code type
n = 0 Select PDF417
n = 1 Select DATA MATRIX
n = 2 Select QR CODE
[Reference]
ESC Z
ESC Z m n k dL dH d1 …dn Print 2-D bar code
[Name]
Print 2-D bar code
[Format]
ASCII
ESC
Z
v
r
k nL nH d1 …dn
Hex
1B
5A v
r
k nL nH d1 …dn
Decimal
27
90 v
r
k nL nH d1 …dn
[Range]
The meaning and scope of the parameters are different, according to the 2-D code type is
selected by GS Z .
The bar code of different Parameter v,r, different meanings.
a. PDF417 2-D code
1 ≤ v ≤ 30 indicates the number of characters per line. Different models, different paper width,
the maximum value of v should be within the max value of this model.
0 ≤ r ≤ 8 indicates error correction levels.
b. DATA MATRIX 2-D code
0 ≤v ≤ 144
Indicates graph height(o:automatic selection)
8 ≤ r ≤ 144
Indicates graph width(v=0,invalid).
c. QR CODE 2-D code
0 ≤ v ≤ 40 Indicates graph version(o:automatic selection)
r =76,77,81,72 Indicates error correction levels.(L:7%, M:15%,Q:25%,H:30%)
。
Parameter k, n(nL, nH), d parameter meaning.
1 ≤ k ≤ 6 Indicates vertical magnification.
1 ≤ n ≤ 65535 Indicates the data length of printing a bar code is n, nL, nH is the low and high of
n(n = dL + dH × 256).
0 ≤ dn ≤ 255 Indicates bar code data.
[Description]
According to the 2-D bar code type is selected by GS Z,printing 2-D bar code graph.
[Reference]
GS Z
[Example]
char SendStr[20] = {0x1D,0x5A,0x02,0x1B,0x5A,0x05,0x03,0x03,0x0A,
0x00,0x31, 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39, 0x30};
SendData(SendStr, 20);