The component is used to create the rMQR Code barcode symbols. It's defined in the prMQRCode unit.
A rMQR Code (also known as Rectangular Micro QR Code) is a two-dimensional matrix symbology that is easy to read and can store large amounts of information. It was developed in 2022 by Denso Wave as a variant of their QR Code. rMQR Code stores about ten times more data than Micro QR Code does in a rectangular shape that is suitable for printing in narrow spaces. Like the other symbols in the QR Code family, rMQR Code efficiently encodes KANJI characters.
To save space, rMQR Code uses a finder pattern and a smaller "finder sub-pattern" instead of the three finder patterns that QR Code uses.
There are two user-selectable levels of error correction, as shown in following table, offering the capability of recovery from the amounts of damage in the table:
| Values of ECCLevel property | ECC levels | Recevory capacities (%) (approx.) |
|---|---|---|
| elMedium | M | 15 |
| elHighest | H | 30 |
You can use the ECCLevel property to specify the error correction code level for a rMQR Code symbol. It can be one of these values: elMedium, and elHighest, corresponding to the error checking and correcting levels M and H. These values are defined in the prMRCode unit.
If the ECCLevelUpgrade property is set to true, the highest error correction code level that can be accommodated by current symbol size will by 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 below). 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.
There are 32 sizes of rMQR Code symbol. referred to as version 1 to 32, in increasing order of data capacity. You can use the MinVersion and the MaxVersion properties to specifiy the minimum and maximum sizes for a rMQR Code symbol. They can be one of values from 1 to 32 (defined in the prMQRCode unit), corresponding to the versions 1 to 32. 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.
These symbol sizes and the maximum data capacity of each version are listed in following table:
| Version | Symbol size (modules) | ECC level | Data capacities | |||
|---|---|---|---|---|---|---|
| Numeric mode | Alphanumeric mode | Byte mode | Kanji mode | |||
| 1 | 7 * 43 | M | 12 | 7 | 5 | 3 |
| H | 5 | 3 | 2 | 1 | ||
| 2 | 7 * 59 | M | 26 | 16 | 11 | 6 |
| H | 14 | 8 | 6 | 3 | ||
| 3 | 7 * 77 | M | 45 | 27 | 19 | 11 |
| H | 21 | 13 | 9 | 5 | ||
| 4 | 7 * 99 | M | 64 | 39 | 27 | 16 |
| H | 30 | 18 | 13 | 8 | ||
| 5 | 7 * 139 | M | 102 | 62 | 42 | 26 |
| H | 54 | 33 | 22 | 14 | ||
| 6 | 9 * 43 | M | 26 | 16 | 11 | 6 |
| H | 14 | 8 | 6 | 3 | ||
| 7 | 9 * 59 | M | 47 | 29 | 20 | 12 |
| H | 23 | 14 | 10 | 6 | ||
| 8 | 9 * 77 | M | 71 | 43 | 30 | 18 |
| H | 37 | 23 | 16 | 9 | ||
| 9 | 9 * 99 | M | 97 | 59 | 40 | 25 |
| H | 49 | 30 | 20 | 12 | ||
| 10 | 9 * 139 | M | 147 | 89 | 61 | 38 |
| H | 75 | 46 | 31 | 19 | ||
| 11 | 11 * 27 | M | 14 | 8 | 6 | 3 |
| H | 9 | 6 | 4 | 2 | ||
| 12 | 11 * 43 | M | 42 | 26 | 18 | 11 |
| H | 23 | 14 | 10 | 6 | ||
| 13 | 11 * 59 | M | 71 | 43 | 30 | 18 |
| H | 33 | 20 | 14 | 8 | ||
| 14 | 11 * 77 | M | 100 | 60 | 41 | 25 |
| H | 52 | 31 | 21 | 13 | ||
| 15 | 11 * 99 | M | 133 | 81 | 55 | 34 |
| H | 66 | 40 | 27 | 17 | ||
| 16 | 11 * 139 | M | 198 | 120 | 82 | 51 |
| H | 97 | 59 | 40 | 25 | ||
| 17 | 13 * 27 | M | 26 | 16 | 11 | 6 |
| H | 14 | 8 | 6 | 3 | ||
| 18 | 13 * 43 | M | 62 | 37 | 26 | 16 |
| H | 28 | 17 | 12 | 7 | ||
| 19 | 13 * 59 | M | 88 | 53 | 36 | 22 |
| H | 45 | 27 | 18 | 11 | ||
| 20 | 13 * 77 | M | 124 | 75 | 51 | 31 |
| H | 66 | 40 | 27 | 17 | ||
| 21 | 13 * 99 | M | 171 | 103 | 71 | 44 |
| H | 80 | 49 | 33 | 20 | ||
| 22 | 13 * 139 | M | 251 | 152 | 104 | 64 |
| H | 126 | 76 | 52 | 32 | ||
| 23 | 15 * 43 | M | 76 | 46 | 31 | 19 |
| H | 33 | 20 | 13 | 8 | ||
| 24 | 15 * 59 | M | 112 | 68 | 46 | 28 |
| H | 59 | 36 | 24 | 15 | ||
| 25 | 15 * 77 | M | 157 | 95 | 65 | 40 |
| H | 71 | 43 | 29 | 18 | ||
| 26 | 15 * 99 | M | 207 | 126 | 86 | 53 |
| H | 111 | 68 | 46 | 28 | ||
| 27 | 15 * 139 | M | 301 | 182 | 125 | 77 |
| H | 162 | 98 | 67 | 41 | ||
| 28 | 17 * 43 | M | 90 | 55 | 37 | 23 |
| H | 47 | 28 | 19 | 12 | ||
| 29 | 17 * 59 | M | 131 | 79 | 54 | 33 |
| H | 63 | 386 | 26 | 16 | ||
| 30 | 17 * 77 | M | 183 | 111 | 76 | 47 |
| H | 87 | 53 | 36 | 22 | ||
| 31 | 17 * 99 | M | 236 | 143 | 98 | 60 |
| H | 131 | 79 | 54 | 33 | ||
| 32 | 17 * 139 | M | 361 | 219 | 150 | 92 |
| H | 178 | 108 | 74 | 46 | ||
If the barcode text does not fill the maximum data capacity of the rMQR Code symbol, remaining data capacity of the symbol will be filled by using PAD characters. 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 (only for Delphi/C++ Builder 2009 or later) event will occur.
The minimum quiet zone is equal to 2 modules on all four sides. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZoneproperties are equal to 2.
All 8-bit values can be encoded. The default interpretation shall be:
This interpretation corresponds to ECI 000003.
The FNC1 characters can be encoded for compatibility with some existing applications. In rMQR Code symbology, there are two mode FNC1 characters to identify symbols encoding messages formatted according to specific predefined industry or application specifications:
First position: FNC1 in this mode indicator identifies symbols encoding data formatted according to the GS1 Application Identifiers standard. For this purpose, it shall only be used once in a symbol and shall be placed at beginning of the barcode text, and after any ECI indicator block or structured append block (if exists).
The escape sequence "\t" or "\f" followed by an Application Identifier (2 or more digits), can be used to placed the FNC1 character in "First position" mode to barcode text. For example, the barcode symbol (01)00012345678905 can be represented using any one of following sequences:
\t0100012345678905
\f0100012345678905
Where the GS1 specifications call for the FNC1 character to be used as a data field separator (i.e. at the end of a variable-length data field), rMQR Code symbols shall use the GS character (byte value 29 in Byte mode or a "%" in Alphanumeric mode, and use "%%" to insert a "%") to perform this function. In this case, any one of "\g", "\d", "\t", and "\f" escape sequences can be used to place the GS character to the barcode text. For example:
\t010001234567890521512\f2018
Second position: FNC1 in this mode indicator identifies symbols formatted in accordance with specific industry or application specifications previously agreed with AIM International. It is immediately followed by an application indicator assigned to identify the specification concerned by AIM International. For this purpose, it shall only be used once in a symbol and shall be placed at beginning of the barcode, and after any ECI indicator block or structured append block (if exists). An application indicator may take the form of any single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number.
There are two ways to place a FNC1 character in "Second position" mode:
The escape sequence "\d" followed by an application indicator (single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number) can be used to placed the FNC1 character in "Second position" mode to barcode text. For example:
\dA0001234567890
\d010001234567890
The escape sequence "\f[<AI>]" can be used to placed the FNC1 character in "Second position" mode to barcode text:
For example:
\f[A]0001234567890
\f[01]0001234567890
Where the application specifications call for the FNC1 character to be used as a data field separator, rMQR Code symbols shall use the GS character (byte value 29) to perform this function. In this case, any one of "\g", "\d", "\t", and "\f" escape sequences can be used to place the GS character to the barcode text. For example:
\dA0001234567890521512\g2018
Note, the "First position" and "Second position" are not used in a literal sense but is a historical reference to the position of the FNC1 symbol character in Code 128 symbols.
The ECI indicator blocks can be encoded for the standardized encoding of message interpretation information. The escape sequence "\e[<ECI_Number>]" can be used to place the ECI indicator block to barcode text. See also the "Extended Channel Interpretation (ECI)" section below.
The AllowEscape property should be set to true in order to place the FNC1 characters or the ECI indicator blocks.
If the AllowEscape property is set to true, following escape sequences are supported by the component, you can insert them to the barcode text:
\\: Insert a backslash to barcode text.
\f: Insert a FNC1 character to barcode text. There are three usages:
Insert a FNC1 character in "First position" mode to the barcode text. In this case, it shall only be used once in a symbol and shall be placed at beginning of the barcode text, and after any ECI indicator block or structured append block (if exists), followed by an Application Identifier (2 or more digits). For example:
\f0100012345678905
Insert a FNC1 character in "Second position" mode to the barcode text. In this case, it shall only be used once in a symbol and shall be placed at beginning of the barcode text, and after any ECI indicator block or structured append block (if exists), followed by an application indicator (single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number), which is enclosed in square brackets. For example:
\f[01]00012345678905
Insert a GS character (ASCII value 29) as the data field separator to the barcode text. In this case, it can be placed anywhere but at beginning of the barcode text. For example:
\t010001234567890521512\f2018
See also the "Character set" section above.
\t: Insert a FNC1 character in "First position" mode to barcode text, or insert a GS character (ASCII value 29) as the data field separator to the barcode text. There are two usages:
Insert a FNC1 character in "First position" mode to the barcode text. It's completely equivalent to escape sequence "\f" that inserts the FNC1 character in "First position" mode. In this case, it shall only be used once in a symbol and shall be placed at beginning of the barcode text, and after any ECI indicator block or structured append block (if exists), followed by an Application Identifier (2 or more digits). For example:
\t0100012345678905
Insert a GS character (ASCII value 29) as the data field separator to the barcode text. It's completely equivalent to the escape sequence "\f" that inserts the FNC1 character as the data field separator. In this case, it can be placed anywhere but at beginning of the barcode text. For example:
\f010001234567890521512\t2018
See also the "Character set" section above.
\d: Insert a FNC1 character in "Second position" mode to barcode text, or insert a GS character (ASCII value 29) as the data field separator to the barcode text. There are two usages:
Insert a FNC1 character in "Second position" mode to the barcode text. It's completely equivalent to escape sequence "\f" that inserts the FNC1 character in "Second position" mode. In this case, it shall only be used once in a symbol and shall be placed at beginning of the barcode text, and after any ECI indicator block or structured append block (if exists), followed by an application indicator (single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number). For example:
\d0100012345678905
Insert a GS character (ASCII value 29) as the data field separator to the barcode text. It's completely equivalent to the escape sequence "\f" that inserts the FNC1 character as the data field separator. In this case, it can be placed anywhere but at beginning of the barcode text. For example:
\f010001234567890521512\d2018
See also the "Character set" section above.
\g: Insert a GS character (ASCII value 29) to the barcode text. When FNC1 is used as a data field separator, it can be used instead of the FNC1 character. For example:
\f010001234567890521512\g2018
See also the "Character set" section above.
\e[<ECI_Number>]: Insert an ECI indicator block to barcode text. See also the "Extended Channel Interpretation (ECI)" section below.
rMQR Code has four encoding modes as Numeric mode, Alphanumeric mode, Kanji mode and Byte mode respectively in decreasing order of encoding density. All 256 8-bits value are encoded by switching automatically between all 4 (the AllowKanjiMode property is set to true) or 3 (the Kanji mode will not be used if the AllowKanjiMode property is set to false) encoding modes. The character sets in each mode are listed in the following:
Numeric mode: Encodes data from the decimal digit set (0 to 9) (byte values 48 to 57).
Alphanumeric mode: Encodes data from a set of 45 characters, i.e. 10 numeric digits (0 to 9) (byte values 48 to 57), 26 alphabetic characters (A - Z) (byte values 65 to 90) , and 9 symbols (SP, $, %, *, +, -, ., /, :) (byte values 32, 36, 37, 42, 43, 45 to 47, 58 respectively).
Byte mode: All 8-bit values can be encoded.
Kanji mode: The Kanji mode efficiently encodes Kanji characters in accordance with the Shift JIS system based on JIS X 0208. The Shift JIS values are shifted from the JIS X 0208 values. JIS X 0208 gives details of the shift coded representation.
It may be possible to achieve a smaller symbol size by using the Kanji mode compaction rules when an appropriate sequence of byte values occurs in the data. You can set the AllowKanjiMode property to false in order to disable the Kanji mode.
The EncodePolicy property indicates how to use these encoding mode by the component. This property can be one of these values (defined in the pQRCodeCom unit):
epMixingOptimal: All 256 8-bits values are encoded by switching automatically between all 4 (the AllowKanjiMode property is set to true) or 3 (the Kanji mode will not be used if the AllowKanjiMode property is set to false) encoding modes. The optimal combination of encoding modes will be used in order to minimize the symbol size.
epMixingQuick: All 256 8-bits values are encoded by switching automatically between all 4 (the AllowKanjiMode property is set to true) or 3 (the Kanji mode will not be used if the AllowKanjiMode property is set to false) encoding modes. The combination of encoding modes may not be the optimal one, in order to optimize encoding speed.
epSingleMode: The encoding mode will be selected automatically and applied to entire symbol, based on the barcode text, in other words, the barcode text to be encoded will be analysed, and an appropriates lowest level (highest encoding density) encoding mode will be selected, in order to minimize the symbol size, and the encoding mode will not be switched in the sybmol. Note, the Kanji mode will not be used if the AllowKanjiMode property is set to false.
The Extended Channel Interpretation (ECI) protocol allows the output data stream to have interpretations different from that of the default character set. Four broad types of interpretations are supported in rMQR Code:
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 rMQR Code symbol by the ECI indicator block. The escape sequence "\e[<ECI_Number>]" is used to place the ECI indicator block to the barcode text:
ECI indicator blocks may be placed anywhere in the barcode text in a single or structured append set of rMQR Code symbols. For example:
ABC\e[123]DEFabc\e[000003]def
The default interpretation for rMQR Code is ECI 000003 representing the ISO/IEC 8859-1 character set.
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.
Set the AllowGS1 property to True in order to encode the GS1 barcode data directly. In this case, use the GS1 barcode text directly as the value for the Barcode or Data property, or as the value for the Barcode or Data parameter in the DrawTo, DrawToSize, Print, and PrintSize methods.
Note, in GS1 barcode text, parentheses "()" should be used to enclose Application Identifiers (AIs), and '((' should be used to insert a '(' character; the FNC1 is inserted automatically, there is no need to insert it manually. For example: '(01)00625251888886(18)110201(10)456((D)CB(21)9876543210'.
(*): The Data property, OnInvalidDataLength and OnInvalidDataChar events are available only for the Delphi/C++ Builder 2009 or later.