23
Compaction Mode Description Encoding Capability
‘0’ (Future Use) Byte Compaction Mode (BC) All characters, (0-255)
‘1’ (Recommended) Text Compaction Mode (TC) ASCII only, (0-127) + Shift to BC Mode is implemented.
‘2’ (Future Use) Numeric Compaction Mode (NC) Digits Only, (‘0’-‘9’)
A’ (Future Use) AUTO (combinations of all modes) Mix of three compaction modes
SL: Security Level byte. This can be any digit from ‘0’ to ‘8’. Set the value of the Security Level based on
the number of user’s data to be encoded
Security Level # Error-Check Code Words
‘0’ 2
‘1’ 4
‘2’ (recommended)
8
‘3’ 16
‘4’ 32
‘5’ 64
‘6’ 128
‘7’ 256
‘8’ 512
SW: Symbol Width byte. This is the total width length of the printed PDF417 symbol. The user may specify any value here,
and the printer will calculate the actual width of the symbol & it will update this value again (Future Use).
Recommended Value: ‘0’ or 0x30
SH: Symbol Height byte. This is the total height length of the printed PDF417 symbol. The user may specify any value
here, and the printer will calculate the actual width of the symbol & it will update this value again (Future Use).
Recommended Value: ‘0’ or 0x30
EW: Element Width byte. This is the width length of a single element in the PDF417 symbol, that is, bar/space width. Can
be set to ‘1’ or ‘2’
Element Width Value Length in mil
‘1’ 4.9 mil
‘2’ (recommended)
9.8 mil
EH: Element Height byte. This is the height length of a single element in the PDf417 symbol, that is, bar/space
height. A value between 0x03 to 0x0A can be used. Recommended Value: 0x06
MSB: Most Significant Byte: This byte represents the most significant byte of how many bytes to encode of User’s
Data. Maximum is 06 in hex, that is, MSB = 06h (max).
LSB: Least Significant Byte: This byte represents the least significant byte of how many bytes to encode of user’s
Data.
User’s data: Data to be encoded in the barcode
Total number of user’s data that can be encode is [MSB][LSB] = 0x06B8 = 1720 bytes, that is, only alphanumeric with
security level set to its minimum value.
Setting the security level to a higher value, will result in less user data to be encoded, since the total number of code
words that can fit in a PDF417 symbol are 929, and if security level is set to ‘8’, then already 512 error code words are
occupied in the symbol, and (929-512 = 417), so only about (417*2) alphanumeric data can be encoded with security
level ‘8’.
If any parameter in the command line does not match the spec in this document, then an error message “Invalid
Barcode” will be sent out from the printer’s serial port.