10.17. MaxiCode

MaxiCode is a fixed-size (1.11inch x 1.054 inch nominal) two-dimensional symbology made up offset rows of hexagonal elements around a unique circular finder pattern. A MaxiCode symbol has 884 hexagonal modules arranged in 33 rows with each row containing up to 30 modules. The maximum data capacity for MaxiCode is 93 characters. The unique design enables the symbol quickly picked up by the scanners.

Figure 10.4. A sample MaxiCode barcode

A sample MaxiCode barcode

MaxiCode is used by United Parcel Service (UPS) for package tracking.

MaxiCode defines 6 modes that determines that how data should be interpreted. The mode 0 and 1 are no longer used. Mode 4 and 5 are used to encode "raw data" with mode 5 offers a slight higher data error correction. Mode 2 and 3 are used to encode “structure message” which comprises two parts: Primary Message and Secondary Message. The Primary Message encodes a postal code, 3-digit country code and 3-digit class of service code. The Second Message encodes other data.

Table 10.8. MaxiCode modes

Mode Description
mode 2 Structured Carrier Message - Numeric Postal Code (up to 9 digits)
mode 3 Structured Carrier Message - Alphanumeric Postal Code(up to 6 characters)
mode 4 Raw Data, Standard Error Correction
mode 5 Raw Data, Enhanced Error Correction
mode 6 Reader Programming Mode

10.17.1. Barcode DLL implementation

Barcode DLL implements the MaxiCode based on ISO/IEC 16023. This ISO standard defines three standard fields in the primary message portion. the standard does not define the data structure for the secondary message. UPS adds many fields in the secondary message portion; and because the limit of data capacity, UPS uses a compression algorithm to put the whole fields into the secondary message. Barcode DLL encodes the secondary message as is. To produce a UPS compliant symbol, you need to consult UPS documentation for those additional fields and the compression algorithm.

When the symbol is encoded under mode 2 and 3, MaxiCode properties such as MaxicodeClass, MaxicodeCountryCode, MaxicodeZipcode are used unless the message starts with a UPS carrier prefix (see below). When the symbol is encoded under other modes, these properties are not placed into the symbol.

The MaxiCode requires the printing equipment having at least 200 dpi in resolution. Rasterizing images with a lower resolution will not produce a quality barcode.

10.17.2. Message Structure

If the message start with the standard carrier prefix ([)>[RS][GS]01[GS]YY), the related properties (MaxiCodeClass, MaxicodeCountryCode and MaxicodeZipCode) will be ignored during the encoding process. The primary and secondary messages are retrieved as follows: The first nine data characters [)>[RS][GS]01[GS]YY are extracted to be encoded in the secondary message. The next three data elements, representing the postal code, country code and service class code respectively are extracted from the source data. The remaining string of data is then encoded in the secondary message after the header [)>[RS][GS]01[GS]YY (excluding three RS characters which separate the three data elements). For example, the message above will be broken into the Primary Message and Secondary Message like this:

  • Primary Message:

    Postal Code - 152382802

    Country Code - 802

    Class of service Code - 001

  • Secondary Message:

    [)>[RS][GS]01[GS]961Z00004951[GS]
    UPSN[GS]06X610[GS]158[GS]1234567[GS]1/1
    [GS]Y[GS]634 ALPHA DRIVE[GS]PITTSBURGH
    [GS]PA[GS][EOT]

10.17.3. Input Format

When creating Maxicode symbols, you can use the following tilde codes:

Table 10.9. Tilde Codes (MaxiCode)

tilde code description
~dnn When nnn corresponds to a numeric value between 0 and 255, the tilde code sequence represents a character with value equal to nnn. For example, ~d032 represents a space character.
~~ Represents a tilde (~) character.
~2 Indicates that a structural append control block follows. See the Structure Append section for more details.
~7 Indicates the start of an ECI block. This escape sequence must be followed by exact 6 digits, which corresponds to the ECI value.
~X Indicates the start of an ECI block. This escape sequence must be followed by exact 6 digits, which corresponds to the ECI value.

Note

In version 3.2, the special character format (a back slash followed by 3 digit ASCII value) is no longer supported.

10.17.4. Extended Channel Interpretation (ECI)

ECI was introduced to allow output data stream to have different interpretations different from the default character set (ISO8859-1). Started from version 3.2, Barcode DLL is capable of encoding ECI values.

An ECI can be any number between 0 and 999999. The tilde code ~7nnnnnn is used to enter the ECI value. The tilde code sequence can appear at any places of the input, but there must be exact 6 digits following ~7. For example to start an interpretation 10, enter ~7000010.

10.17.5. Structural Append (SA)

The structural append feature allows up to 8 symbols in a structure. A capable reader can either buffer the contents of each symbol until all symbols are read.

To encode structural append, you must supply there items for each symbol:

  • Symbol Sequence Indicator (SI). The sequence indicator is 1-based index which identify the position of this particular symbol in the group. Can be any number between 1 and 8.

  • Total number of symbols (TS). This value indicates the number of total symbols. Can be any number between 1 and 8. The value should be consistent among all symbols in the group.

The tilde code sequence is expressed in the following format:

~2[SI][TS]

For example, tilde code sequence ~1[1][6] indicates that the current symbol is the first symbol in a group with 6 symbols in total.

The ~2 tilde code sequence must appear at the end of the input. All three fields are required. They must be enclosed within a pair of square brackets [ ] and must follow the tilde code sequence ~2.