
Thermal Printer Technical Manual
57
①GS k m v r d1...dn NUL ②GS k m v r nL nH d1...dn Print 2-D bar code
[Name]
Print 2-D bar code
[Format]
①ASCII
GS
k
m v
r
d1...dn NUL
Hex
1D
6B
m v
r
d1...dn 00
Decimal
29
107
m v
r
d1...dn 0
②ASCII GS
k
m v
r
d1...dn NUL
Hex
1D
6B
m v
r
nL nH
d1... dn
Decimal
29
107
m v
r
nL nH
d1... dn
[Range]
①32 ≤ m ≤34
②97 ≤ m ≤ 99
The bar code of different Parameter v, r, different meanings.
a. PDF417 2-D bar 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 bar code
0 ≤v ≤ 144
Indicates graph height(o:automatic selection)
8 ≤ r ≤ 144 Indicates graph width(v=0,invalid).
c. QR CODE 2-D bar code
0 ≤ v ≤ 40 Indicates graph version(o:automatic selection)
1 ≤ r ≤ 4 Indicates error correction levels(L:7%,M:15%,Q:25%,H:30%)
。
· Parameter n(nL, nH), d Parameter meaning.
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]
Select a type of 2-D code and print bar codes.
When using the first form, the command to 00 end, d1 ... Dn as bar code data when using the
second form, nH n after full character d1 ... Dn as bar code data.
mused to select the bar code type, as follows:
m
Bar Code
Type
Data length
v
r
d
① 32
QR Code
1 ≤ n ≤ 65535
0 ≤ v ≤ 40
1 ≤ r ≤ 4
0 ≤ dn ≤ 255
33
Data Matrix 1 ≤ n ≤ 65535
0 ≤v ≤ 144
8 ≤ r ≤ 144
0 ≤ dn ≤ 255
34
PDF417
1 ≤ n ≤ 65535
1 ≤ v ≤ 30
0 ≤ r ≤ 8
0 ≤ dn ≤ 255
② 97
QR Code
1 ≤ n ≤ 65535
0 ≤ v ≤ 40
1 ≤ r ≤ 4
0 ≤ dn ≤ 255
98
Data Matrix 1 ≤ n ≤ 65535
0 ≤v ≤ 144
8 ≤ r ≤ 144
0 ≤ dn ≤ 255
99
PDF417
1 ≤ n ≤ 65535
1 ≤ v ≤ 30
0 ≤ r ≤ 8
0 ≤ dn ≤ 255
[Notes]
When printing 2-D code using this command, bar code magnification is decided by the n ,n is set
by the GS w.
[Reference]
ESC Z, GS w
[Example]
char SendStr[11] = {0x1D,0x6B,0x20,0x03,0x03,0x31,0x32,0x33,0x34, 0x35,0x00};