Technical Specifications - MaxiCode
MaxiCode is an ISO international standard (IEC 16023). You are allowed to use it in your applications. It is mainly used for shipping packages.
MaxiCode is a 2D barcode that can encode a specific amount of information within a square symbol. All 256 characters can be encoded.
You may use multiple symbols to spread your information in order to create a bigger message.
This barcode contains a way to detect and correct errors based on the Reed Solomon algorithm. The level of correction included can be standard or enhanced.
Encoding
The data encoded in the barcode comes from different code sets. Switching between code sets will impact the maximal amount of data you can use.
Here is the list of what each code set can encode. All the code sets support FS (28), GS (29), RS (30) and space (32)
- Code Set A: Uppercase, numeric, and 15 common punctuation symbols: "#$%&'()*+,-./: and CR (13)
- Code Set B: Lowercase and several punctuation symbols: {}~`;<=>?[\]^_,./:@!| and DEL (127)
- Code Set C: Multilingual uppercase and other graphic characters: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞߪ¬±²³µ¹º¼½¾€‚ƒ„…†‡ˆ‰
- Code Set D: Multilingual lowercase and other graphic characters: àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¡¨«¯°´·¸»¿Š‹ŒŽ‘’“”
- Code Set E: ASCII 0-31, 149-160, 162-167, 169, 173-174, 182
Encoding always starts with code set A.
Mode
There are five modes available. Each of them include different functionality.
Select the appropriate mode for your application.
- Mode 1: Structured Carrier Message (see further)
- Mode 4: Standard Symbol (default)
- Mode 5: Full EEC
- Mode 6: Reader Programming
Modes 2 and 3
These modes shall be reserved for use as a destination sortation symbol for use by carriers in the transportation industry. This message includes:
- 3 digits class of service
- 3 digits country code (ISO 3166)
- postal code
In mode 3, postal code encodes up to 6 characters from code set A.
To use one of these modes, you can use the setPrimaryMessage() method.
If you do not use this method, Barcode Bakery will try to extract the required data from the parse() method.
You can also use the generic open standard which begins by [)>RS01GS
In this case, the message looks like this:
[)>RS01GSyyppppppGSaaaGSbbbGSrest
- yy: date (yy), followed by
- pppppp: postal code, followed by the separator GS, then
- aaa: country code, followed by the separator GS, then
- bbb: class of service, followed by the separator GS, then
- rest: optional rest of the message
Messages
MaxiCode encodes the data in two messages called the Primary and Secondary message. For mode 4, 5 or 6, the primary and secondary message are merged to form only one.
However, the primary message always uses enhanced error correction, whereas the secondary message always uses the standard error correction unless mode 5 is selected.
Structured Append
BCGmaxicode supports the Structured Append mode. You can spread across multiple barcodes a single message thanks to this feature.
You can use a maximum of 8 different barcodes.
Extended Channel Interpretation
BCGmaxicode supports the Extended Channel Interpretation. This allows the output have interpretations different from that of the default character set.
To activate it, you have to use setAcceptECI() and use the code \xxxxxx in your message. X represents a number from 0 to 9.
You wish to encode this string: ¶Ж. Both characters are represented by the ASCII code 182.
The first character is from ECI 000003 (ISO-8859-1 which is the default) and the second one is from ECI 000007 (ISO-8859-5 cyrillic).
You can proceed like this:
$code->setAcceptECI(true);
$code->parse(chr(182) . '\000007' . chr(182));
Please note that your Barcode Reader must support this feature.
Ready for Printing
Barcode Bakery prepares the MaxiCode for printing. At scale 1, the image is perfect for printing at 300 DPI.
However, if you want to display the barcode on the screen, you will need to resize the image with imagecopyresampled().
Barcode Bakery Supports
Supports | |
---|---|
Encodes Characters, Numbers, Binary | |
Encodes on many codes (Structured Append) | |
Extended Channel Interpretation (Arabic, Hebrew, etc.) | |
Modes 2 and 3 for destination sortation symbol | |
Modes 0 and 1 * | |
Specific to PHP package | |
PHP 7.4 | |
PHP 8+ |