The MaxiCode barcode is a 2D barcode that consists of 884 hexagons surrounding a bull’s-eye finder pattern. One bit of information is encoded by one hexagon. Up to 100 characters of information can be encoded in one square inch, which is the approximate fixed size of such a barcode. The MaxiCode symbology includes built-in error correction capability, automatic data compression and full ASCII character set.  


MaxiCode has been created by UPS and endorsed by AIM (Uniform Symbology Specification MaxiCode) as a multi-purpose EDI-ready two-dimensional barcode. UPS uses MaxiCode to encode all information about the parcels, to provide a faster and better service to its clients.


Read the latest “Guide to Bar Coding With UPS OnLine For customers Generating Bar Code Labels”, “MaxiCode” section, for format information.


MaxiCode data is a string made of a header, the ANSI message and an End Of Transmission code.
Hereunder is the detailed information found in the ANSI message for the UPS MaxiCode.
Please note that BarDIMM does not expect data in the same order. Please read the next paragraph for information on the data order. 


Always use uppercase characters for the MaxiCode data.


LIST OF MAXICODE INFORMATION FIELDS


 

Field nameDescriptionRequired/Optional
Destination Postal code5 or 9 Alpha/Numeric charsR
Destination Country code3 digitsR
Class of service (3 digits)3 digitsR
Tracking number10 or 11 Alpha/Numeric charsR
Standard Carrier Alpha CodeUPSNR
Shipper number6 Alpha/Numeric charsR
Day of pick up3 digitsR
Shipment ID number1-30 Alpha/Numeric charsO
Item x of n in total1-3/1-3 digitsR
Weight (lb.)1-3 digitsR
Address validation (Y/N)Y or NR
Destination address1-35 Alpha/Numeric charsO
Destination city1-20 Alpha/Numeric charsR
Destination state2 alpha charsR



The different fields are separated with the  (Group Separator, ASCII 29, HEX 1D).
The barcode data terminates with the <Eot> (End of transmission, ASCII 04, HEX 04).
To separate format types, use <Rs> (Field separator, ASCII 30, HEX 1E).
To separate primary and secondary address numbers, use <Fs> (Address field separator, ASCII 28, HEX 1C).
BarDIMM expects to get both the primary and secondary messages from the application, separated by a comma. 

The primary message data is composed of:

1. the label number (maximum: 8)
2. the number of labels for the current Package (maximum: 8)
3. the MaxiCode mode. Use 2 for domestic US shipments, 3 for international shipments
4. the postal code
5. the country code
6.    the class of service    

A comma must separate all those parameters

The secondary message is composed of:


 

1. the ANSI Message Header[ )> <Rs>
2. the Transportation Data Format Header01 <Gs>96
3. the Tracking Number(i.e.: 1Z00004951 <Gs> )
4. the SCACUSPN <Gs>
5. the UPS Shipper Number(i.e.: 06×610 <Gs> )
6. the Julian Day of Pickup(i.e.: 159 <Gs> )
7. the Shipment ID #(i.e.: 1234567 <Gs> )
8. the Package n/x(i.e.: 1/1 <Gs> )
9. the Package Weight(i.e.: 10 <Gs> )
10. the Address Validation(i.e.: Y <Gs> )
11. the Ship To Address(i.e.: 634 ALPHA DR <Gs> )
12. the Ship To City(i.e.: PITTSBURGH <Gs> )
13. the Ship To State(i.e.: PA )
14. the End Of Format character<Rs> (ASCII 30)
15. the End Of Transmission<Eot> (ASCII 04)



Blank fields still must include the <Gs> separator.


UPS MaxiCode expects the secondary message to be padded with fill characters to a total of 84 total characters. BarDIMM takes care of that requirement and there is no need to pad the data on the right (the fill character is ‘!’ ASCII 33, HEX 21).

The secondary message cannot be longer than 84 characters. Therefore, the destination address length must be truncated if required if the total length for the secondary message is greater than 84 characters. That destination address is anyway optional in the MaxiCode data. If data is too long, BarDIMM will not print the MaxiCode and prints an error message indicating by how many characters the length exceeds 84.


After the <Eot> character, the application must send immediately a PCL escape sequence to switch a font other than MaxiCode.
For example, to switch to Courier font 10CPI, the sequence is:
<Esc>(s0p10h12vbs4099T
Note: if you use a character set other than PC-8, you should resend the character set selection before selecting the new font.


Example

<Esc>(s24800T1,1,2,152382802,840,001,[)> <RS>01 <GS>96995011234 <GS>840 <GS>025 <GS>1Z07000168 <GS>UPSN <GS>WX9031 <GS>272 <GS><GS>1/1 <GS>15 <GS>Y <GS>123 <FS>300 <GS><GS>AK <RS><EOT><Esc>(s0p10h12vbs4099T