The component is used to create the Grid Matrix 2D barcode symbols. It's defined in the pfmxGridMatrix unit.
Grid Matrix is a square, variable-sized, two-dimensional matrix symbology with unique dark- and light-framed "macromodules" that create a grid design that provides a robust finder pattern. The unique finder pattern ensures that readers can locate and orient the symbol even with significant symbol damage.
Grid 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.
Grid Matrix was invented by Syscan Technology Co., Ltd.
There are thirteen sizes of Grid Matrix symbol, referred to as version 1 to 13, in increasing order of size and data capacity. You can use the MinVersion and the MaxVersion properties to specifiy the minimum and maximum sizes for a Grid Matrix symbol. They can be one of values from 1 to 13 (defined in the pfmxGridMatrix unit), corresponding to the versions 1 to 13. The smallest symbol size that accommodates the barcode text will be automatically selected between minimum and maximum symbol sizes. The CurrentVersion property can be used to get the factual symbol size.
The symbol sizes and the maximum data capacity of each version are listed in following table:
Version | Symbol sizes (modules) | Maximum data capacities (bits) | ||||
---|---|---|---|---|---|---|
ECC Level 1 | ECC Level 2 | ECC Level 3 | ECC Level 4 | ECC Level 5 | ||
1 | 18 * 18 | - | 105 | 91 | 77 | 63 |
2 | 30 * 30 | 315 | 280 | 245 | 210 | 175 |
3 | 42 * 42 | 623 | 553 | 483 | 413 | 343 |
4 | 54 * 54 | 1022 | 910 | 798 | 686 | 567 |
5 | 66 * 66 | 1526 | 1358 | 1190 | 1022 | 847 |
6 | 78 * 78 | 2135 | 1897 | 1659 | 1421 | 1183 |
7 | 90 * 90 | 2835 | 2520 | 2205 | 1890 | 1575 |
8 | 102 * 102 | 3647 | 3241 | 2835 | 2429 | 2023 |
9 | 114 * 114 | 4550 | 4046 | 3542 | 3038 | 2527 |
10 | 126 * 126 | 5558 | 4942 | 4326 | 3710 | 3087 |
11 | 138 * 138 | 6671 | 5929 | 5187 | 4445 | 3703 |
12 | 150 * 150 | 7875 | 7000 | 6125 | 5250 | 4375 |
13 | 162 * 162 | 9191 | 8169 | 7147 | 6125 | 5103 |
If the barcode text does not fill the maximum data capacity of the Grid 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 property, an OnInvalidLength or OnInvalidDataLength event will occur.
There are five user-selectable levels of error correction, from 1 to 5 respectively in increasing order of recovery capacity.
You can use the ECCLevel property to specify the error correction code level for a Grid Matrix symbol. It can be one of these values: elLevel_1, elLevel_2, elLevel_3, elLevel_4, and elLevel_5 (they are defined in the pfmxGridMatrix unit), corresponding to the ECC levels from 1 to 5.
These ECC levels are listed in following table:
Value of ECCLevel property | Error correction code level | Percentage of total capacity for ECC data |
---|---|---|
elLevel_1 | 1 | 10% |
elLevel_2 | 2 | 20% |
elLevel_3 | 3 | 30% |
elLevel_4 | 4 | 40% |
elLevel_5 | 5 | 50% |
Note, the ECC level 1 is inapplicable to the version 1.
Also, you can set the ECCLevel property to elLevel_Recommend or elLevel_LowestRecommend. For each symbol version, the denotative ECC levels are listed in following table:
Version | Denotative ECC level | |
---|---|---|
ECCLevel = elLevel_Recommend | ECCLevel = elLevel_LowestRecommend | |
1 | 5 | 4 |
2 | 4 | 2 |
3 | 4 | 1 |
4-13 | 3 | 1 |
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.
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.
All 7-bit ASCII values can be encoded.
8-bit binary data can be encoded.
GB 18030 Chinese characters can be encoded.
Five non-data characters can be encoded:
The AllowEscape property should be set to true in order to place these non-data characters.
If the AllowEscape property is set to true, following escape sequences are supported by the component, you can insert them to the barcode text:
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 Grid 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 Grid 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.
In order to handle larger messages than are practical in a single symbol, a data message can be distributed across several Grid Matrix symbols. Up to 16 Grid 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 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...