ESC/ P Command Reference

Table Of Contents
ESC/P Command Reference
- 79 -
5. Control Command Details
(*1) With Micro QR, the Structured Append setting is invalid, and the default setting is used.
(*2) With Micro QR, error correction level 4 is invalid, and the default setting is used.
(*3) Some barcode readers cannot recognize a barcode with the cell size specified as 1 dot or 2 dots.
What is the QR Code Structured Append setting?
QR Codes have Structured Append settings.
A long character string can be partitioned into 2 to 16 partitions and printed.
With ESC/P commands, it is necessary to enter only the number of partitions.
For example, if the print data is partitioned into 3 partitions, the barcode data is as follows:
ESC i Q or q [1st parameter] [1st set of barcode data] \\\
ESC i Q or q [2nd parameter] [2nd set of barcode data] \\\
ESC i Q or q [3rd parameter] [3rd set of barcode data] \\\
Refer to the following for specifying settings for 3 through 6 in [Parameters].
3. Structured append
setting:
This determines whether or not the barcode data is partitioned. If the data is
not partitioned, enter 0.
When not partitioning, the values of 4 (code number), 5 (number of
partitions), and 6 (parity data) are ignored; therefore, enter 0 as a dummy
value for these parameters.
4. Code number:
This indicates which number the ESC/P command for that QR Code is.
For example, if it is for the second of four partitions, this is 2; for the fourth
this is 4.
5. Number of partitions:
This is the number of partitions.
6. Parity data:
This is the value (in bytes) of exclusively ORing all the print data (print data
before partition). Entering the same value as for the partitioned QR Code
ESC/P command indicates that these codes are linked.
What is exclusive ORing in bytes?
The data is exclusively ORed (XORed) in bytes and in order.
For example, putting a character string into hexadecimal gives 31h, 32h, 33h, 34h.
Character
ORed (XORed) in bytes
Results
XOR of 31h and 32h
0011 0001 ^= 0011 0010
0000 0011 (03h)
XOR of 03h and 33h
0000 0011 ^= 0011 0011
0011 0000 (30h)
XOR of 30h and 34h 0011 0000 ^= 0011 0100
0000 0100 (04h)
Therefore, the parity is 04h.
Note
If this parity value is incorrect, the correct QR Code is not generated.