TBarcode2D_CompactMatrix

The component is used to create the Compact Matrix 2D barcode symbols. It's defined in the pCompactMatrix unit.

Compact MatrixCompact Matrix is a variable-sized two-dimensional matrix symbology. The code graph adopts sprocket hole positioning and graphic sectioning techniques to perform fast and accurate identification and handling of 2D barcode graph by analyzing the information of sprocket position and graphic section.

Compact Matrix can encode 7-bit ASCII, numeric, and binary data, in addition to any combination of data types in the same symbol, particularly effective with Chinese characters.

Compact Matrix was invented by Syscan Technology Co., Ltd.


Symbol sizes

There are 32 vertical sizes of Compact Matrix symbol, referred to as version 1 to 32, in increasing order of symbol height and data capacity. In horizontal orientation, each Compact Matrix symbol consists of an array of segments with a minimum of 1 segment (maximum 32 segments).

You can use the MinVersion and the MaxVersion properties to specifiy the minimum and maximum version for a Compact Matrix symbol. And use the MinSegments and the MaxSegments properties to specifiy the minimum and maximum number of segments for it. In other words, the MinVersion and MinSegments properties specify a minimum symbol size, and the MaxVersion and MaxSegments properties specify a maximum symbol size. According to the priority order specified by the StretchOrder property, the first symbol size that accommodates the barcode text will be automatically selected between the minimum symbol size and the maximum symbol size.

You can use the CurrentVersion property to get the factual version. And use the CurrentSegments property to get the factual number of segments.

If the barcode text does not fill the maximum data capacity of the Compact Matrix symbol, remaining data capacity of the symbol will be filled by using pad bits (the ECCLevelUpgrade property is set to false), or will be used to upgrade the error correction code level (the ECCLevelUpgrade property is set to true). If the barcode text is so long that it cannot be encoded using the maximum symbol size specified by the MaxVersion and the MaxSegments properties, an OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur.


Error correction code (ECC)

There are eight user-selectable levels of error correction, from 1 to 8 respectively in increasing order of recovery capacity.

You can use the ECCLevel property to specify the error correction code level for a Compact Matrix symbol. It can be one of values from 1 to 8, corresponding to the ECC levels from 1 to 8.

These ECC levels are listed in following table:

Error correction code levelPercentage of total capacity for ECC data
18%
216%
324%
432%
540%
648%
756%
864%

If the ECCLevelUpgrade property is set to true, the highest error correction code level that can be accommodated by current symbol size will be used for creating more robust symbols. Note, the new level is always no lower than the level specified by the ECCLevel property, and the symbol size will not be increased, it may be determined depending on the length of barcode text, and the error correction code level specified by the ECCLevel property (see also the "Symbol sizes" section above). In other words, only the remaining capacity in current symbol size will be used to upgrade the error correction code level. The property CurrentECCLevel can be used to get the factual error correction code level.


Quiet zones

The minimum quiet zone is equal to 6 modules on all four sides. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties are equal to 6.


Character set

Escape sequences

If the AllowEscape property is set to true, following escape sequences are supported by the component, you can insert them to the barcode text:


Extended Channel Interpretation (ECI)

The Extended Channel Interpretation (ECI) protocol allows the output data stream to have interpretations different from that of the default character set.

The ECI protocol provides a consistent method to specify particular interpretations on byte values before printing and after decoding. The ECI is identified by an integer (up to 6 digits) which is encoded in the Compact Matrix symbol by the ECI indicator block. The escape sequence "\e[<ECI_Number>]" is used to place the ECI indicator block to the barcode text:

In a single symbol or structured append set of Compact Matrix symbols, if the AIM FNC1 ("\0"), GS1 FNC1 ("\1"), FNC2 (structured append block, "\2"), and FNC3 ("\3") are used, ECI indicator blocks may be placed anywhere behind of them, otherwise, they may be placed anywhere in the barcode text. For example:

ABC\e[123]DEFabc\e[000003]def

The AllowEscape property should be set to true in order to place the ECI indicator blocks. Any ECI invoked shall apply until the end of the barcode text, or until another ECI indicator block is encountered. Thus the interpretation of the ECI may straddle two or more symbols.


Structured append

In order to handle larger messages than are practical in a single symbol, a data message can be distributed across several Compact Matrix symbols. Up to 16 Compact Matrix symbols may be appended in a structured format to convey more data. If a symbol is part of a structured append this shall be indicated by a structured append block in barcode text. The escape sequence "\2[<File_Id>, <Amount>, <Index>]" is used to place the structured append block to the barcode text:

The AllowEscape property should be set to true in order to place the structured append block. The structured append block may only be placed once in the barcode text. If the structured append block is used together with AIM FNC1 ("\0"), GS1 FNC1 ("\1") or FNC3 ("\3"), the AIM FNC1 ("\0"), GS1 FNC1 ("\1") or FNC3 ("\3") shall be placed at beginning of the barcode text, then the structured append block. Otherwise, the structured append block shall be placed at beginning of the barcode text. The OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur if the structured append block be placed more than once, or it isn't placed at beginning of the barcode text or behind of the AIM FNC1 ("\0"), GS1 FNC1 ("\1") or FNC3 ("\3"). The following is examples of structured append:

\2[79, 5, 2]ABCDEFGabcdefg1234567890...

\0\2[99, 6, 1]ASDFGHJKL098765...


Properties:
Methods:
Events:

(*): The Data property, OnInvalidDataLength and OnInvalidDataChar events are available only for the Delphi/C++ Builder 2009 or later.

Contents