TBarcode2D_AztecCode

The component is used to create the Aztec Code 2D Barcodes symbols. It's defined in the pAztecCode unit.

Aztec CodeAztec Code is a two-dimensional matrix symbology whose symbols are nominally square, made up of square modules on a square grid, with a square bullseye pattern at their center. Aztec Code symbols can encode from small to large amounts of data with user-selected percentages of error correction. All 256 8-bit values can be encoded.

Aztec Code is invented by Andrew Longacre, Jr. and Robert Hussey in 1995. The code was published by AIM, Inc. in 1997. It is used for small item marking applications using a wide variety of printing and marking technologies.


Formats

There are two basic formats of Aztec Code symbols:

You can use the SymbolMode property to specify which formats and Aztec Code symbol sizes (see also the "Symbol sizes" section below) will be automatically selected between the minimum and maximum symbol sizes specified by corresponding MinSize and MaxSize properties, based on the length of barcode text. It can be one of these values (defined in the pAztecCode unit):


Symbol sizes

The smallest Aztec Code symbol is 15 * 15 modules square, and the largest is 151 * 151. There are 36 square symbol sizes available in Aztec Code symbology. These are specified in following table (defined in the pAztecCode unit):

SizesFormatsLayersDimension (modules)Maximum data capacities
DigitsTextBytes
azSize_15CompactCompact115 * 1513126
azSize_19Full range119 * 1918158
azSize_19CompactCompact219 * 19403319
azSize_23Full range223 * 23494024
azSize_23CompactCompact323 * 23705733
azSize_27Full range327 * 27846840
azSize_27CompactCompact427 * 271108953
azSize_31Full range431 * 3112810462
azSize_37537 * 3717814487
azSize_41641 * 41232187114
azSize_45745 * 45294236145
azSize_49849 * 49362291179
azSize_53953 * 53433348214
azSize_571057 * 57516414256
azSize_611161 * 61601482298
azSize_671267 * 67691554343
azSize_711371 * 71793636394
azSize_751475 * 75896718446
azSize_791579 * 791008808502
azSize_831683 * 831123900559
azSize_871787 * 871246998621
azSize_911891 * 9113781104687
azSize_951995 * 9515111210753
azSize_10120101 * 10116531324824
azSize_10521105 * 10518011442898
azSize_10922109 * 10919561566976
azSize_11323113 * 113211616941056
azSize_11724117 * 117228118261138
azSize_12125121 * 121245219631224
azSize_12526125 * 125263221071314
azSize_13127131 * 131281822561407
azSize_13528135 * 135300724071501
azSize_13929139 * 139320525651600
azSize_14330143 * 143340927281702
azSize_14731147 * 147361628941806
azSize_15132151 * 151383230671914

Note:

You can use the MinSize and the MaxSize properties to specify the minimum and maximum sizes for an Aztec Code symbol. The smallest symbol size that accommodates the barcode text will be automatically selected between the minimum and maximum symbol sizes.

If the barcode text does not fill the maximum data capacity of the Aztec Code symbol, remaining data capacity of the symbol will be used as excess error correction. If the barcode text is so long that it cannot be encoded using the maximum symbol size specified by the MaxSize property, an OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur. The CurrentSize property can be used to get the factual symbol size.


Quiet zones

No quiet zone is required outside the bounds of the Aztec Code symbol. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties are equal to 0.


Error checking and correcting (ECC)

The design of Aztec Code technically allows a symbol to include as little as none or as much as 99% in error correction codewords, though both limits are unsound. The recommended level of error correction for normal use is 23% of symbol capacity plus 3 codewords more. They may also choose to override the default error correction level, specifying either an alternate minimum error correction percentage or a fixed symbol format and ECC size.

Users, judging their applications to be especially benign or critical, may choose to specify an alternate minimum error correction percentage (specified by the ECCLevel property), ranging from 0% to 99% plus always, for data security, 3 or more additional error correction codewords (specified by the ECCCount property). This is called a "minimum" percentage because, depending on message length, the symbology will typically have to add extra error correction codewords above this minimum to fill out the symbol.

Some applications will be best served by specifying a fixed size (number of codewords) to be used for all Aztec Code symbols regardless of their data content. In this case, the ECCLevel property should be set to 0, and the ECCCount property should be set to a size which includes adequate error correction for the longest message anticipated; then, typically shorter messages will be encoded with excess error correction, creating more robust symbols for this application.


Character set
  1. All 8-bit values can be encoded. The default interpretation shall be:

    This interpretation corresponds to ECI 000003.

  2. Two non-data characters can be encoded, FNC1 for compatibility with some existing applications and ECI indicator blocks for the standardized encoding of message interpretation information.

    The AllowEscape property should be set to true in order to place the FNC1 characters or the ECI indicator blocks.


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. Four broad types of interpretations are supported in Aztec 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 Aztec 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 Aztec Code symbols. 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 fit a non-square area or to handle larger messages than are practical in a single symbol, a data message can be distributed across several Aztec Code symbols. Up to 26 Aztec Code 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 "\s[<Index>, <Amount>, <Message_ID>]" 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 only once in the barcode text. Also, it 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. The following is an example of structured append:

\s[2, 5, DESCRIPTION]ABCDEFGabcdefg1234567890


Properties:
Methods:
Events:

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

Contents