data-matrix

The data-matrix bar code type can be used to encode text and binary data of variable length. It is possible to encode up to 1558 code words.

Text, binary data and numeric data are compressed into code words so that the limits for these types are:

  • Alphanumeric data - up to 2335 characters
  • 8-bit byte data - 1555 characters
  • Numeric data - 3116 digits

The limits for mixed text are lower, as control characters are inserted to switch between the different compression modes.

Data matrix symbols exist in several flavours with varying methods and degrees of error correction. Of the possible options ECC 000, ECC 050, ECC 080, ECC 100, ECC 140 and ECC 200 this implementation supports only ECC 200 using Reed Solomon error correction.

The special control character "structured append" is not supported.

When smartParse it set to true, the encoder encodes all Unicode characters. It does this by embedding ECIs when codeValue contains characters that are not within the code page ISO-8859-1 (Latin 1).

Many scanners have only partial support for ECIs. The rendering hint pxmlPreferredCharset is used in some cases to make scanners with limited ECI support work.

The conversion of the data specified in the codeValue attribute to the internal representation is done by an algorithm that minimizes space. Byte values that cannot be represented in an XML document (for example all characters lower than 0x20 except 0x9, 0xa and 0xd) can be represented by a backslash ('\') character followed by a 3 digit octal literal. The backslash character itself can be escaped by a sequence of two backslash characters.

The preferRectangularSymbols attribute is unique to this bar code type. If you are concerned about running out of space in the vertical of the page, you might prefer a symbol that is wider than it is high. This property produces a rectangular shaped symbol if the encoded data does not exceed 49 code words.

Since Genero Report Writer 5.00, multi ECI support has been added for data-matrix bar codes and an improved encoding algorithm has been added to render some bar code values smaller.

To revert to the previous versions ECI support and encoding, use the rendering hint pxmlEncodeDataMatrixBackwardCompatible=[true/false] (false).