Table of Contents
- 10.1. Introduction
- 10.2. Code 39
- 10.3. Code 39 Full ASCII
- 10.4. Code 39 HIBC
- 10.5. Codabar
- 10.6. Code 93
- 10.7. MSI/Plessey, Code 25 and Code11
- 10.8. UPC-A,UPC-E and UPC Supplements
- 10.9. EAN-13, EAN-8 and EAN Supplements
- 10.10. ISBN/Bookland
- 10.11. Code 128
- 10.12. UCC/EAN-128
- 10.13. DataBar Symbology Family
- 10.14. Interleaved 2 of 5 (ITF25)
- 10.15. POSTNET
- 10.16. PDF 417
- 10.17. Data Matrix
- 10.18. MaxiCode
Barcode has been widely adopted across all major industries. A conventional barcode is a machine readable symbol consisting of a series of parallel, adjacent bars and spaces. The basic barcode structure features leading and trailing quiet zones, a start character, one or more data characters, one or more check characters (optional) and a stop character.
Barcode has a long development history that spanned half a century. During the evolution process, many formats have been developed and adopted by industries. Around a dozen of them are actively used today.
The term “symbology” is the scientific name for the barcode format. Different symbologies have different characteristics, such as the encoding efficiency and character set. The character set defines what kind of data the symbology encodes. Typically there are four types of character sets: (1) numeric. Only digits can be encoded. (2) alpha-numeric. The symbology is capable of encoding numbers, letters plus several punctuations. (3) full ASCII. All characters in the ASCII set, with value between 0 and 127, can be encoded. (4) Binary. Binary character set includes all 256 characters in a 8-bit single byte character set. Most of two dimensional symbologies are capable of encoding arbitrary binary data.
Some symbologies may impose length requirements. For example, UPC-A encodes the numeric data of exact 12 digits.
Two dimensional symbologies are usually capable of encoding thousand of characters.
Barcode DLL supports the following symbologies:
Table 10.1. Symbologies Supported by Barcode DLL
Symbology | Also Known As |
---|---|
Code 39 | Code 3 of 9, AIAG, USS Code 39 |
Code39 Full ASCII | Code 39 Extended |
HIBC Code 39 | HIBC, LOGMARS |
Codabar | Rationalized Codabar |
Code 93 | |
Code 128 | USS-128, C-128 |
GS1-128 | UCC 128, EAN 128 |
Interleaved 2 of 5 | ITF, ITF-14, I 2 of 5 |
UPC-A | |
UPC-E | |
EAN-13 | |
EAN-8 | |
Bookland | |
Telepen, Telepen Numeric | |
Postnet, Planet | |
Royal Mail | UK Postal Code, RM4SCC |
MSI/Plessey | Plessey Code |
Code 25 | Industry 25, Code 2 of 5 |
Code 11 | |
PDF417 | |
DataMatrix | |
MaxiCode | UPS barcode |
DataBar | RSS-14, DataBar-14, DataBar Omindirectional |
DataBar Truncated | RSS-14 Truncated, DataBar-14 Truncated |
DataBar Stacked | RSS-14 Stacked, DataBar-14 Stacked |
DataBar Stacked Omnidirectional | RSS-14 Stacked Omnidirectional |
DataBar Limited | RSS-14 Limited |
DataBar Expanded | RSS Expanded, DataBar Expanded Stacked, RSS Expanded Stacked |
You can purchase symbology standards directly from AIM Inc. The web address of AIM is http://www.aimglobal.org.
Code 39 (also known as USS Code 39, Code 3 of 9) is the first alpha-numeric symbology developed to be used in non-retail environment. It is widely used to code alphanumeric information, such as the model number etc. It is designed to encode 26 upper case letters, 10 digits and 7 special characters:
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 -, ., *, $, /, +, %, SPACE.
Each code 39 symbol begins with a start character and ends with a stop character. Traditionally the start/stop characters are represented by asterisk character (*). Due to this reason, some applications include asterisks in the human readable text. The asterisks are not part of the encoded message and should not appear within the message.
Code 39 allows an optional checksum digit based on modulo 43 algorithm. The health industry has adopted the use of the check character for health applications and these types of barcodes are often referred as HIBC.
Property Code39OptionalCheckDigit specifies whether an additional check digit should be added to
the barcode. Another property, Code39StartStopChars, when it is set to TRUE
,
adds the traditional start/stop characters
(*
)
to the beginning and the end of the human readable text.
![]() |
The Code 39 Full ASCII (sometimes also referred as Code 39 extended) is an extension to normal code 39. It is capable of encoding all 128 ASCII characters. It uses shift characters to combine two normal code 39 characters to encode a character not in the normal code 39 character set. The barcode generated is compatible with normal code 39 so the scanner must be configured to Full ASCII mode to read the barcode correctly.
![]() |
Code 39 Full ASCII supports entering control characters
using special character input method. You can use a back slash \
plus 3-digit decimal ASCII code to enter a control
character. For example, the following input encodes digits 123
,
followed by a NUL
character and letters abc
:
Data Input: 123\000abc
![]() |
Code39 HIBC is exactly the same as normal Code39, with Code39OptionalCheckDigit property set to true. The standard also says that the starting character in the message must be a plus (+) symbol. Barcode DLL automatically adds this plus sign (+) if the encoded message does not meet this requirement.
The HIBC standard requires that the checksum digit to appear
in the human readable. To satisfy this requirement, your program should
explicitly set property ShowcheckDigit to TRUE
to create a compliant HIBC symbol.
Setting Code39OptionalCheckDigit to FALSE
does not affect the resulted barcode.
![]() |
Codabar is a variable length symbology which encodes a
character set of 16 letters ( 0-9
, -
, $
, :
, /
, +
).
It is dubbed as NW-7
in Japan.
You may choose one
of these four start/stop characters in your symbol: A
, B
, C
and D
.
If you do not specify the start/stop characters,
Barcode DLL uses A and B as the start/stop characters,
respectively. No check digit is required.
![]() |
Code 93 is a variable length symbology that is capable of encoding all 128 ASCII characters. Code 93 offers higher density than Code 39. It has the same native character set as Code 39 (43 characters) but it uses additional 4 shift characters to encode other characters. Code 93 features 2 checksum characters. Start/Stop characters are also required.
Code 93 supports special character input method. See Code 39 Full ASCII section for details on how to escape control characters.
![]() |
These are rather obsolete symbologies which only encode numeric data. There is no advantage to use them except for application backward compatibility. More information can be found at Morovia barcode library at http://www.morovia.com/education/.
The UPC-A barcode is the most common and well-known symbology in North America. You can find it on the cartons of virtually every consumer goods in your local supermarket, as well as books, magazines, and newspapers. A short form is called UPC-E. Each symbol may have 2-digit or 5-digit supplement to encode additional information.
![]() | ![]() |
UPC-A encodes 11 digits of numeric data along with a trailing check digit, for a total of 12 digits of barcode data.
A UPC-A number consists of four areas: (1) The Number System; (2) The manufacturer code; (3) the product code; (4) The check digit. Normally the number system digit is printed to the left of the barcode, and the check digit to the right. The manufacturer and product codes are printed just below the barcode, separated by the guard bar.
The UPC-E barcode is the short form representation of a UPC number. It reduces the data length from 12 digits to 6 digits by compressing the extra zeros. It is suited for identifying products in small packages.
A UPC-E barcode has 6 digits with an implied number system 0. The first 5 digits are calculated based on a conversion algorithm described below. The last digit is the check digit of the original UPC-A symbol.
Both UPC-A and UPC-E symbols allow for a supplemental two or five digit add-on barcode. This add-on barcode usually encodes the price or a sequence number. To include a supplemental message, append it to the main message with a vertical bar (|) separating it from the main message. The supplemental message must consist of exact two or five digits.
Table 10.2. Examples of UPC-A, UPC-E and Supplement
Message | Symbol Created |
---|---|
90123678812 | UPC-A |
90123678812|02 | UPC-A with 2-digit add on |
0123456 | UPC-E |
0123456|95000 | UPC-E with 5-digit add on |
EAN is designed by the International Article Numbering Association (EAN) in Europe. It is an extension to UPC-A to include the country information. The only difference between UPC-A and EAN-13 is that the number system in UPC-A is a single digit varying from 0 through 9 whereas an EAN-13 number system consists of two digits ranging form 00 to 99.
![]() | ![]() |
EAN-13 encodes 12 digits of numeric data along with a trailing check digit, for a total of 13 digits data.
An EAN-13 number consists of four areas: (1) the Number System; (2) the manufacturer code; (3) the product code; (4) the check digit. Normally the number system digit is printed to the left of the barcode, and the check digit to the right. The manufacturer and product codes are printed just below the barcode, separated by the guard bar.
EAN-8 is the short version of EAN-13, the same as UPC-E vs. UPC-A. While they look very similar, some differences exist. UPC-E does not explicitly encode the first digit (NS) while EAN-8 encodes all 8 digits. From barcode encoding/decoding perspective, an EAN-8 is not compatible with UPC-E. Moreover, although a UPC-E number can be converted back to UPC-A, this is not the case for EAN-8. There is no defined method for conversions between EAN-13 to EAN-8. An EAN-8 number is assigned in the same way as EAN-13.
An EAN-8 number contains 7 digits of message plus 1 check digit. The first two or three digits identify the numbering authority; the remaining 4 or 5 digits identify the product.
Table 10.3. Examples of EAN-13, EAN-8 and Supplement:
Message | Symbol Created |
---|---|
97802161594 | EAN-13 |
978020161594|02 | EAN-13 with 2-digit add on |
71245126 | EAN-8 |
71245126|95000 | EAN-8 with 5-digit add on |
The International Standard Book Number (ISBN) has been invented for more than 30 years. It has experienced exponential growth and remarkable success. Today, every book, magazine, cassette and CD bear an ISBN number. Every item to be sold in bookstore is required to furnish an ISBN. The ISBN is used extensively by publishers, retailers as wells as libraries to manage inventory. The ISBN is represented through an EAN barcode, a.k.a. Bookland barcode plus an optional 5-digit (2-digit for magazines) add-on.
![]() |
An ISBN is a 10 digit number preceded by the letters ISBN. The text is usually printed with an OCR-A font. The ten-digit number is divided into four parts of variable length, which are separated by hyphens or spaces. The four parts are Group Identifier, Publisher Identifier, Title Identifier and check digit respectively. Note that the length of each part is not fixed, though the total length must be 10.
A Bookland symbol may have an optional 2-digit or 5-digit
add-on symbol. To add the supplement, add them at the end of
the main message and separate the two parts with a vertical
bar(|), in the same way as the UPC and EAN
supplements. For example, to encode an ISBN number 0-201-61595-9
with
pricing information 53995
,
set the Message
property to 0-201-61595-9|53995
.
Note on 13-digit ISBN
Beginning on January 1, 2007, all 10-digit ISBNs are required
to be re-expressed as a 13-digit number (EAN-13). To convert a 10-digit
ISBN to 13-digit EAN number, drop the last checksum digit of
the 10-digit ISBN number and add
prefix 978
at the beginning. Calculate the EAN-13
check digit based on the result and append this checksum digit
to the end of the result. To create the barcode, use EAN13 symbology
instead and assign the 13-digit ISBN number to the message property.

Code 128 is a high-density alpha-numeric symbology. Since introduced in early 1980s, it has gained wide popularity in many industries. UCC/EAN derives its retail carton tracking standard UCC/EAN 128 based on Code 128 symbology.
Code 128 is a variable length, continuous symbology
with multiple element widths. Every Code 128 symbol has a
check character. Each character is encoded with three bars
and spaces, in total 11
modules.
In the most recent standard ISO/IEC 15417, Code128 is extended to encode all 256 characters of a single-byte character set[2]. The default character set is ISO 8859-1 (Latin Alphabet No. 1).
Code 128 standard also defines four function codes for
special purposes. FNC2
is used to tell barcode reader to
store the data and transmit with next symbol; FNC4
is used as
a latch code word to switch into extended ASCII mode. FNC3
is
reserved for future use. FNC1
is used in UCC/EAN128 to act as
UCC/EAN-128 identifier and field delimiter.
Barcode DLL allows encoding all 256
characters as well as 4 special symbol characters: FNC1
, FNC2
, FNC3
and FNC4
.
Internally Code128 defines 3 character sets
(A
, B
and C
) to allow efficient encoding.
Each character set contains
103 characters (including special symbol characters). A
code128 symbol starts with one character set and latches to a
different set with a latch codeword. Since these three
character sets overlap, it is possible to get different
barcodes with the same data encoded.
To allow space efficiency, during the encoding process, Barcode DLL selects the proper character sets and inserts necessary shift characters to make the symbol generated as short as possible.
Code128 requires a checksum character to ensure the data integrity. The checksum character has no meaning to the end user. Barcode DLL does not transmit the checksum digit back to the human readable text.
Note
Barcode DLL always tries to create the shortest barcode. For example, if Barcode DLL sees that some portion of the data is best fit encoded with Code128 C it automatically select character set C. The end user does not have the control on how the data is encoded.
Under some circumstances it is necessary to represent
some characters with an ASCII-only format. This kind of
representation format is called escape sequence. For example,
the four special Code128 symbol characters, FNC1~FNC4
, do not
have corresponding ASCII values. Consequently the only way to
enter them into the Message property is through their escaped
forms. Some applications and programming environments may
only accept printable ASCII characters, and control
characters must be escaped.
Tilde code sequence is the only escape method supported in Barcode DLL version 3.2 and above. The special character input method (escaping a character using a back-slash character followed by 3-digit character value) present in previous versions is now deprecated.
The tilde code consequences used in Code128 are listed as below:
- ~dnnn
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.
- ~1
Represents a
FNC1
character. The tilde escape sequence can appear anywhere in the input.- ~2
Represents a
FNC2
character.- ~3
Represents a
FNC3
character.- ~4
Represents a
FNC4
character.FNC4
is used to encode extended ASCII characters. You do not need to enter the FNC4 in most circumstances. Just pass the extended characters you'd like to encode.- ~X
Represents a character value from 0 to 26. Replace the X like in the following example
~@
means character ascii 0,~A
means character 1,~B
means character 2,~C
means character 3 and so on.
Note
Due to the fact that each symbology encodes different character set, the tilde code sequence varies from symbology to symbology. Refer to the tilde codes section of each symbology to understand how to escape the character.
UCC/EAN-128[3] encodes structured data proposed by various industry standard bodies and authorized by GS1 organization. Each data type is identified with a numeric value, called Application Identifier (AI). Multiple AIs and values can be concatenated together into one barcode, such as:
(01)19421123450011(15)991231(10)101234
The data above contains multiple AIs and values:
01
indicates that the value followed19421123450011
is a SCC-14 number. [4]15
is the AI for Sell by Date. The value followed991231
indicates that the Sell By Date is December 31, 1999.10
is the AI for Batch Number. According to the specification, it is a variable length AI. Here the value is101234
.
The AI value determines the meaning and the length of the value part. Many of them encode a predefined length of data. For example, the SCC14 requires exact 14 digits and the Sell By Date requires exact 6 digits in YYMMDD format.
When the data length can be derived from AI, it is
not necessary to add field separator (FNC1) in the barcode
to separate two adjacent
fields. However, if the first field has a variable data
length, such a field separator is required. And in many
applications it is often desirable to have a field separator
between two fixed-length fields. The Code128 symbol character FNC1
serves this purpose.
To understand each data field, Barcode DLL requires you to enter the data in a special format. The AI must be enclosed with parentheses. From the AI Barcode DLL knows whether a field has a fixed length or a variable length. For all variable-length fields, Barcode DLL inserts field separator unless it ends the input.
Barcode DLL also performs data validation on the AI and the data, if the AI is known to the program.
Table 10.4. List of Known AIs
AI | Name | Constraint | Short Name |
---|---|---|---|
00 | SSCC (Serial Shipping Container Code) | n2+n18 | SSCC |
01 | Global Trade Item Number | n2+n14 | GTIN |
02 | GTIN of Trade Items Contained in a logistic unit | n2+n14 | CONTENT |
10 | Batch or lot number | n2+an..20 | BATCH/LOT |
11 | Production date (YYMMDD) | n2+n6 | PROD DATE |
12 | Due date (YYMMDD) | n2+n6 | DUE DATE |
13 | Packaging date (YYMMDD) | n2+n6 | PACK DATE |
15 | Best before date (YYMMDD) | n2+n6 | BEST BEFORE or SELL BY |
17 | Expiration date (YYMMDD) | n2+n6 | USE BY OR EXPIRY |
20 | Product variant | n2+n2 | VARIANT |
21 | Serial number | n2+an..20 | SERIAL |
22 | Secondary data for specific health industry products | n2+an..29 | QTY/DATE/BATCH |
240 | Additional product identification assigned by the manufacturer | n3+an..30 | ADDITIONAL ID |
241 | Customer part number | n3+an..30 | CUST. PART NO. |
242 | Made-to-Order Variation Number | n2+n..6 | Variation Number |
250 | Secondary serial number | n3+an..30 | SECONDARY SERIAL |
251 | Reference to source entity | n3+an..30 | REF. TO SOURCE |
253 | Global Document Type Identifier | n3+n13+n..17 | DOC. ID |
254 | GLN Extension component | n3+an..20 | GLN EXTENSION |
30 | Variable count | n2+n..8 | VAR. COUNT |
310n-369n | (Trade and logistic measurements) | n4+n6 | -- |
337n | Kilograms per square metre | n4+n6 | KG PER m2 |
37 | Count of trade items contained in a logistic unit | n2+n..8 | COUNT |
390(n) | Amount payable - single monetary area | n4+n..15 | AMOUNT |
391(n) | Amount payable - with ISO currency code | n4+n3+n..15 | AMOUNT |
392(n) | Amount payable for a Variable Measure Trade Item - single monetary unit | n4+n..15 | PRICE |
393(n) | Amount payable for a Variable Measure Trade Item - with ISO currency code | n4+n3+n..15 | PRICE |
400 | Customer's purchase order number | n3+an..30 | ORDER NUMBER |
401 | Consignment number | n3+an..30 | CONSIGNMENT |
402 | Shipment Identification Number | n3+n17 | SHIPMENT NO. |
403 | Routing code | n3+an..30 | ROUTE |
410 | Ship to - deliver to Global Location Number | n3+n13 | SHIP TO LOC |
411 | Bill to - invoice to Global Location Number | n3+n13 | BILL TO |
412 | Purchased from Global Location Number | n3+n13 | PURCHASE FROM |
413 | Ship for - deliver for - forward to Global Location Number | n3+n13 | SHIP FOR LOC |
414 | Identification of a physical location Global Location Number | n3+n13 | LOC No |
415 | Global Location Number of the Invoicing Party | n3+n13 | PAY |
420 | Ship to - deliver to postal code within a single postal authority | n3+an..20 | SHIP TO POST |
421 | Ship to - deliver to postal code with Three-Digit ISO country code | n3+n3+an..9 | SHIP TO POST |
422 | Country of origin of a trade item | n3+n3 | ORIGIN |
423 | Country of initial processing | n3+n3+n..12 | COUNTRY - INITIAL PROCESS. |
424 | Country of processing | n3+n3 | COUNTRY - PROCESS. |
425 | Country of disassembly | n3+n3 | COUNTRY - DISASSEMBLY |
426 | Country covering full process chain | n3+n3 | COUNTRY - FULL PROCESS |
7001 | NATO stock number | n4+n13 | NSN |
7002 | UN/ECE meat carcasses and cuts classification | n4+an..30 | MEAT CUT |
703(s) | Approval number of processor with ISO country code | n4+n3+an..27 | PROCESSOR # s4 |
7003 | Expiration Date and Time | n4+n10 | EXPIRY DATE/TIME |
8001 | Roll products - width, length, core diameter, direction, and splices | n4+n14 | DIMENSIONS |
8002 | Electronic serial identifier for cellular mobile telephones | n4+an..20 | CMT No |
8003 | Global Returnable Asset Identifier | n4+n14+an..16 | GRAI |
8004 | Global Individual Asset Identifier | n4+an..30 | GIAI |
8005 | Price per unit of measure | n4+n6 | PRICE PER UNIT |
8006 | Identification of the component of a trade item | n4+n14+n2+n2 | GCTIN |
8007 | International Bank Account Number | n4+an..30 | IBAN |
8008 | Date and time of production | n4+n8+n..4 | PROD TIME |
8018 | Global Service Relation Number | n4+n18 | GSRN |
8020 | Payment Slip Reference Number | n4+an..25 | REF No |
8100 | GS1-128 Coupon Extended Code - NSC + Offer Code | n4+n1+n5 | - |
8101 | GS1-128 Coupon Extended Code - NSC + Offer Code + end of offer code | n4+n1+n5+n4 | - |
8102 | GS1-128 Coupon Extended Code - NSC | n4+n1+n1 | - |
90 | Information mutually agreed between trading partners (including FACT DIs) | n2+an..30 | INTERNAL |
91-99 | Company internal information | n2+an..30 | INTERNAL |
If the AI is not listed in the table above [5],
Barcode DLL
can not know whether its data length is fixed or variable.
Thus, Barcode DLL treats the data as if its data
length is variable and inserts a field separator FNC1
when this
field does not end the symbol.
For example, suppose that you set Message to (01) 19421123450011(8019)123456(15)051210
.
Barcode DLL understands that 01 AI requires
fixed-length 14 digits data and AI 15 requires fixed-length
14 digits data. However, Barcode DLL does not
understand AI 8019 and treats this field as if it has a
variable length. Barcode DLL inserts a field
separator at the end of this field (before AI 15).
Assuming that AI 8019 requires a fixed data length, you can tell
Barcode DLL that the field has a fixed data length by
appending a tilde character ~
at the end of the field. For
example, you can assign the value below:
(01)94211234500122(8019)123456~(15)051210
When Barcode DLL sees the ~
, it treats the current
field as fixed-length.
On the other side, if a known AI has a fixed data length but you'd like to have a field separator at the end of the field, you can do so by adding an exclamation character at the end of field, such as:
(01)94211234500122!(8019)123456(15)051210
It forces a field separator to appear after the SCC14 number even AI 01 has a fixed data length and the field separator is not required. Sometimes this field separator is desirable because it is easier for the application to parse the input.
See the table below for the comparison among results produced by different
inputs. The[ GS] is the scanner output for FNC1
character.
Barcode | Data input/Scanner output |
---|---|
![]() | (01)94211234500122(8019)123456~(15)051210 0194211234500122801912345615051210 |
![]() | (01)94211234500122!(8019)123456(15)051210 0194211234500122[ GS]8019123456[ GS]15051210 |
![]() | (01)94211234500122(8019)123456(15)051210 01942112345001228019123456[ GS]15051210 |
Before version 3.4, Barcode DLL calculates mod10 check digits
on SCC-14 and SSCC-18 numbers, but only When the property UccEanOptionalCheckDigit is TRUE
.
This behavior has been changed since version 3.4. Now the program calculates
mod 10 check digit automatically, regardless the value of
UccEanOptionalCheckDigit. This renders this property useless.
Barcode DLL performs check digit calculation on those AIs: 00
, 01
, 02
, 410
, 411
, 412
, 413
, 414
, 415
, and 8018
.
To create the barcode correctly you must enclose the AI
with parentheses ( )
. Barcode DLL only accepts
numeric AI values. It reports an error when encountering a
non-numeric character in the AI part. If AI does not
appear in the known list (see the table above), and you do
not want the data treated as variable length, you should tell
so by appending a tilde character at the end of the
field.
Sometimes, it is desirable to have the data separated
by spaces in the human readable text. For example, you may
like to see the human readable text (8101) 0 54321 1200(21)123456
instead of (8101)0543211200(21)123456
.
You can create the desirable human readable text by entering the message exactly like the one you'd like the human readable to
be. Barcode DLL ignores the spaces during the encoding, but
preserves them in the human readable text, as the one
below illustrates:

Barcode DLL performs the following validations during the encoding process:
Check whether the AI is numeric.
Check whether a data part follows the AI.
If the AI is known to Barcode DLL and requires a fixed length of data part, check if the data part has the correct length.
Check whether the AI is enclosed with parentheses.
If the AI is known to Barcode DLL and requires only numeric or alpha-numeric data, check if the data part meets the requirement.
If the AI is know to Barcode DLL and requires variable length of the data, check if the length of the data exceeds the maximum size allowed.
If your application does not pass the validation, you can not use UCC/EAN-128 to encode the data. Nevertheless, since UCC/EAN-128 encoding is based on Code128 symbology, you can encode the data directly with Code128. Here are several hints you may consider when converting the EAN-128 data into a Code128 input:
An EAN-128 barcode starts with a
FNC1
character. FNC1 can be entered with tilde code sequence ~1.If you'd like to have the field separator encoded between two adjacent fields, using FNC1 character to separate two fields.
Code128 is capable of encoding spaces. Do not enter spaces in the input if you do not want them appear in the barcode.
You may use tilde code sequences to enter extended ASCII characters. See Section 10.11, “Code 128” for details.
For example, Code128 with message ~18101054321120021123456
produces the exact barcode as the
one using UCC/EAN-128 with message (8101)0 54321 1200(21)123456
.

Some non-standard applications do not encode the FNC1
at the starting message. When this is the case, remove ~1 at
the beginning of the input.
DataBar family formerly referred to as Reduced Space Symbology, or RSS, adopted its official new name GS1 DataBar on February 12, 2007. The GS1 board, formerly known as UCC/EAN organization, has declared that “GS1 DataBar symbols and GS1 Application Identifiers shall be available in all trade item scanning systems beginning Jan 1, 2010.”[6]
GS1 DataBar is really a family of bar code symbologies. Some are very small, intended for produce and small consumer packages. And some are larger, intended to carry more data needed for identifying variable-measure foods and the required content on coupons. Some can be read omnidirectionaly, which makes them perfectly suitable for POS applications.
Table 10.5. GS1 DataBar Family
Variant | Data Encoded | POS | Applications | Sample Barcode |
---|---|---|---|---|
DataBar Omnidirectional | 14-digit GTIN | Yes | Packaged goods | ![]() |
DataBar Stacked Omnidirectional | 14-digit GTIN | Yes | Packaged goods, Produce | ![]() |
DataBar Expanded | Any GS1-128 data, up to 74 digits or 41 alphanumeric | Yes | Variable-measure food, Coupons | ![]() |
DataBar Expanded Stacked | Any GS1-128 data, up to 74 digits or 41 alphanumeric | Yes | Variable-measure food, Coupons | ![]() |
DataBar Truncated | 14-digit GTIN | No | Health care item | ![]() |
DataBar Stacked | 14-digit GTIN | No | Health care item | ![]() |
DataBar Limited | 14-digit GTIN | No | Health care item | ![]() |
Among the seven variants, four, DataBar-14, DataBar Stacked Omni, DataBar Expanded and DataBar Expanded Stacked were designed and specifically to work at retail POS because they can be omnidirectionally read. The remaining three, DataBar Truncated, DataBar Stacked, and DataBar Limited, are not recommended to work at retail POS and were design for very very small products (such as healthcare items).
All DataBar symbologies except DataBar Expanded and DataBar Expanded Stacked require 13 digit or 14 digits as input (the GTIN number). The last check digit is not actually encoded into the barcode. Scanners are required to calculate the check digit and transmit it together upon reading the barcode.
Note
The GS1-128 application
identifier for GTIN, 01
, is required to transmit back
with 14-digit data. Therefore, a standard complaint scanner will
transmit 0104412345678909
upon reading a DataBar barcode with GTIN number 04412345678909
encoded.
GTIN is the acronym for Global Trade Item Number, a 14-digit number that identifies trade items developed by GS1 organization. This number have many names, such as SCC-14 (Serial Container Code), UCC-14.
GTIN can be derived from UPC-A or EAN-13 numbers. The first digit is package indicator. Digit '0' and '9' have special meanings here - '0' often means that there is one item in the box, and '9' indicates a variable measure item. The package indicator is followed by GS1 company prefix (assigned by GS1) and item number (assigned by the company). They should be in total of 12 digits. This portion is the same as the first 12 digits in an EAN-13 number, or '0' plus the first 11 digits in a UPC-A number. The last digit is checksum, which is calculated based on Mod10 algorithm on previous 13 digits.
Because UPC-A and EAN-13 numbers can be thought as special cases of GTINs (the package indicator is '0'), a 14-digit GTIN unqiuely identifies any trade item (a single item or a container).
GTIN is often depicted using Interleaved 2 of 5 or GS1-128 symbologies. This is expected to change as GS1 is endorsing DataBar. The benefits of using DataBar is that it produces more compact barcodes, espcially when comparing with UPC-A and EAN-13 symbols. Furthermore, DataBar Expanded allows additional information to be encoded, such as serial number, weight or price.
DataBar Truncated and DataBar Stacked symbols have their height fixed to its X-dimension. That is, you can not change the height by modifying BarHeight property. They are always 13X.
In DataBar Stacked Omnidirectional and DataBar Expanded Stacked symbols, the overall size of the barcode (excluding human readable text and other elements) is not the same as BarHeight, because multiple rows exist.
To achieve omnidirectional scannability and standard conformance, the following minimum height should be observed for DataBar-14, DataBar Stacked Omnidirectional, and DataBar Expanded (X=NarrowBarWidth):
DataBar: 33X
DataBar Stacked Omni: 33X
DataBar Limited: 10X
DataBar Expanded: 34X
DataBar Expanded Stacked: 34X
The widths of stacked symbols (DataBar Stacked etc.) can be very small to hold the human readable text in one line. When this happens, the human readable text will wrap into multiple lines. If this is not desired, turn the human readable text off and set it to the comment. You can set comment margin properties CommentMarginLeft and CommentMarginRight to adjust the with of comment block.
![]() | ![]() |
Normal (comment off, human readable on) | human readable off, comment on, CommentMarginLeft=200 mils |
DataBar Expanded and DataBar Expanded Stacked usually encode a GTIN number plus additional information, such as price, weight, expiration date and so on. Moreover, any GS1-128 data can be encoded in DataBar Expanded and DataBar Expanded Stacked.
Although they are referred separately, DataBar Expanded Stacked is a superset of DataBar Expanded. Any DataBar Expanded symbols are also DataBar Expanded Stacked symbols. Therefore, in our implementation we use DataBar Expanded for both cases, you create DataBar Expanded Stacked symbols by setting symbols per row value to a non-zero value.
Because the support for DataBar Expanded is added in version 3.4, and we did not want to add additonal properties to break backward compatiblity, we choose an existing property, PDFMaxCols for this purpose. By default, PDFMaxCols is set to zero, which creates a non-stacked DataBar Expanded barcode. To create a DataBar Expanded Stacked barcode, set this property to an even number between 2 and 22. [7]
For all DataBar symbologies except DataBar Expanded and DataBar Expanded Stack, the input is required to be a 13-digit GTIN number. You can also enter 14 digits, however, the last digit is ignored. Excessive input will be truncated.
The input format for DataBar Expanded and DataBar Expanded Stacked
is identical to the
one specified in Section 10.12, “UCC/EAN-128”. AIs must
be enclosed in parentheses. Barcode DLL will parse the data according
to rules set by Application Identifiers. For example, input (01)90012345678908(3103)012233(15)081231
is valid, which encodes the following information: GTIN 0012345678908,
weight 12.233Kilogram, and production date Dec. 31, 2008.
In the input for DataBar Expanded, spaces can appear as part of input, and they are preserved in the human readable text. However, spaces are not part of the data and are not encoded into the barcode.
Interleaved 2 of 5 is a high-density numeric symbology. Some applications require a modulo 10 checksum digit at the end of the message. Interleaved 2 of 5 uses an “interwinded” method to create barcodes and consequently it requires the data length to be even. In order to meet this requirement, Barcode DLL appends a MOD10 check digit when it finds that the input is in odd length. Otherwise, it encodes the data as is.
Note that this behavior has changed since version 3.4. Previously,
check digit is added only when property I2of5OptionalCheckDigit is TRUE
, otherwise a '0' is appended instead.
The new implement allows you to enter 13
digits SCC-14 number to get a complete barcode with the check digit.
If the check digit is added, it always appears in the human readable text.
The input for Interleaved 2 of 5 allow spaces. The spaces are preserved
in the human readable text but not encoded into the barcode. Fro example,
the barcode below is created
on input 0 07 70007 0723
. Note that the last digit '9' is
the check digit, which is calculated by the program.
Interleaved 2 of 5 is widely used to encode Shipping Container Code (SCC-14), which contains exact 14 digits. When it is used for encoding SCC-14 numbers, it is also called ITF-14.

You can add bear bars to the barcode by setting BearerBars to TRUE
.

POSTNET (Postal Numeric Encoding Technique) encodes a US numeric address code (also called Zip code) which may contain 5, 9 or 11 digits - frequently referred as Zip, Zip+4 and Zip+6.
POSTNET is a height-modulated symbology which encodes the data in the height of the barcode instead of the width. Barcode DLL produces POSTNET barcode based on USPS standard. The height of each bar and the pitch between two adjacent bars are fixed and can not be modified - changing NarrowBarWidth and BarHeight yields no effect. Although Barcode DLL produces human readable if you desire, keep in mind that USPS standard does not allow human readable text under the barcode.
Barcode DLL accepts non-numeric input but
filters them out at the time of the encoding. It adjusts the
length by adding trailing zeros to meet the length requirement.
You may take the advantage by
assigning the full address line to the Message instead of
passing only digits. For example, data input Monterey Park, CA 91755-1688
yields an identical barcode as message 917551688
.
PDF417 is a multi-row, variable-length symbology with high data capacity and error-correction capability. PDF417 offers some unique features which make it the widely used 2D symbology. A PDF417 symbol can be read by linear scanners, laser scanners or two-dimensional scanners. PDF417 is capable of encoding more than 1100 bytes, 1800 text characters or 2710 digits. Large data files can be encoded into a series of linked PDF417 symbols using a standard methodology referred to as Macro PDF417.
The data is encoded using one of three compaction modes: Text compaction mode, which encodes alpha-numeric characters and punctuations; Binary compaction mode, which encodes all 8-bit characters; Numeric compaction mode, which achieves the highest density by only allowing digits. The default mode is Text compaction mode. Using special code words, the compaction mode can be switched from one to another. Barcode DLL automatically selects the compaction mode based on data encoded and shifts accordingly.
Each PDF417 symbol contains 2
to 512
error correction
code words corresponding to error correction level 0
(the
least) to 8
(the highest).
In PDF417 the security level is selectable. You can
specify a value between 0
and 9
for PDF417SecurityLevel.
Value 9
means automatic and the
program selects the security level based on the data
encoded and the recommendation from the PDF417
specification.
There are several properties determining the size and
the shape of the symbol. PDFMaxRows sets the maximum number
of rows allowable and PDFMaxCols sets the maximum number of
columns. A PDF417 symbol can have 30
columns and 60
rows.
It should be pointed out that the row and column here
really mean code words, instead of modules. The width of
the representation of a code word is much longer than its
height. Value 0
allows Barcode DLL
to select the value based on the amount of the data and
the aspect ratio.
The data capacity is directly linked to the number of columns and rows. Setting PDFMaxRows and PDFMaxcols to small values results smaller data capacity. When the program is unable to encode the data within the limits, an error is reported.
Other related properties include PDFModuleHeigth, PDFModuleWidth and PDFAspectRatio. The smallest unit in a PDF417 symbol is called a module. The PDDFModuleWidth and PDFModuleHeight reflect the height and width of the module respectively.
PDFAspectRatio impacts the shape of the final symbol. The PDFAspectRatio is defined as the ratio of the height to the overall width of the symbol. Barcode DLL locates the solution that close matches the specified value. Note: in many cases to match the aspect ratio Barcode DLL has to increase the overall symbol size. Smaller PDFAspectRatio value usually produces more compact symbols.
![]() | ![]() | ![]() |
PDFAspectRatio=0.5 (default) | PDFAspectRatio=0.2 | PDFAspectRatio=1.0 |
PDF417 is capable of encoding all characters with ASCII
values between 0
and 255
.
Depending on programming
environment you may need tilde codes to escape some
characters.
When creating PDF417 barcodes you can use the following tilde codes:
- ~dnnn
When
nnn
corresponds to a numeric value between 0 and255
, the tilde code sequence represents a character with value equal tonnn
. For example,~d032
represents a space character.- ~~
Represents a tilde (~) character.
- ~2
Indicates that a MacroPDF417 control block follows. The ~2 tilde codes format is a Morovia extension.
- ~3
Indicates the start of a GLI block. This escape sequence must be followed by exact 6 digits, which corresponds to the GLI value.
- ~X
Represents a character value from 0 to 26. Replace the X like in the following example ~@ means character ascii 0, ~A means character 1, ~B means character 2, ~C means character 3 ...
In a relatively clean environment where label damage is not likely, the right column indicators can be omitted and the stop pattern can be reduced to one module bar. This truncation reduces the data overhead and saves some space at the cost of performance and robustness.
To produce truncated PDF417 symbols, set the property PDF417TruncatedSymbol to TRUE
.
GLI was introduced to allow output data stream to
have interpretations different from the default
character set (ISO8859-1). Since version 3.2,
Barcode DLL has been capable of encoding GLI values. A GLI
can be any number between 0
and 999999
.
The tilde code sequence ~7nnnnnn
is used to enter the ECI value.
The tilde code sequence can appear at any places of the input, provided that
exact 6
digits follows ~7
.
For example to start an interpretation 10, enter ~7000010
.
Using Macro PDF417, large amount data are splitted into
several file segments and encoded into individual symbols. To
create Macro PDF417 symbols, you need to enter the control
block information using ~2
tilde code sequence. A sample
input looks like this:
12345678901234567890~2[3][LA-CONFIDENTIAL][6][fn:part2|ts:199044|ad:Justin Power|fs:110990]
Syntax
The tilde code sequence for Macro PDF417 control block information is as follows:
~2[SI][FID][TS][fn:string|...]
The ~2
must appear at the end of the message. The
data after the control block is ignored. The first three
fields are required. The last field is optional and can
contain several additional sub-fields.
Segment Index (SI)
In Macro PDF417, each symbol represents a segment of the whole file. To rebuild the whole file, the segment must be constructed in proper order. The value of segment index is 0 based. For example, for a file divided into k segments, the segment index can be any number between 0 and k-1.
The value allowed for SI is between 0 and 99.
File ID (FID)
All symbols belong to the same group have the same
file ID. The File ID can be any string, such as archive2
.
Although the standard does not set a limit on the
length of the File ID, keep in mind that the control block
reduces the overall symbol capacity.
Total Segments (TS)
The “total segments” field is required for every symbol in the group. It should remain constant among all symbols.
Optional Fields
Macro PDF417 defines several optional fields to encode
additional file information such as file name, timestamp,
file size and checksum. All these fields must be at the end
of the control block. If more than two optional fields are present,
they should be separated with vertical bars |
.
Within a field, a colon :
divides the name part
and value part.
The acceptable field names are listed below:
Table 10.6. Optional Fields in Macro PDF417
Field Designator | Field Name (abbreviated) | Field Name (normal) | Comment | Data Type |
---|---|---|---|---|
0 | fn | filename | File Name | string |
1 | sc | segmentcount | Segment Count | number |
2 | ts | timestamp | Time Stamp | number |
3 | sd | sender | Sender | string |
4 | ad | addressee | Addressee | string |
5 | fs | filesize | File Size | number |
6 | cs | checksum | Checksum | number |
For example, [fn:archive1.zip|ts:20051231|sd:user@example.com|cs:9901234]
encodes 4 optional fields: file name (archive1.zip
), time
stamp (20051231
),
sender (user@example.com
)
and checksum (9901234
).
Data Matrix is high density two dimensional symbology
capable of encoding up to 2,000
characters of data. It used
to have a group of error correction schemes from ECC00 to
ECC140; now the standard mandates ECC200 to be used.
Barcode DLL creates ECC200 Data Matrix
barcodes.
In version 3.2, several optional features are added to Barcode DLL:
Extended Channel Interpretations. This optional feature enables characters from other character sets (e.g. Arabic, Cyrillic and Greek) and other data interpretations or industry-specific requirements to be represented. This feature requires reader support.
FNC1 character. The
FNC1
character, when appearing at the start of the symbol, indicates the data contains a specific industry format authorized by AIM. It can also appear in other positions acting as a field separator.Macro Character
05
and06
. Data matrix provides a means of abbreviating an industry specific header and trailer in one symbol character.Reader Programming. A reader programming character indicates that the symbol encodes a message used to program the reader system. Requires reader support.
Structural Append. The Structural Append feature enables encoding large amount of data using multiple symbols. Requires reader support.
Data Matrix defines 30 different sizes. Most sizes are square, and a couple of them are rectangle. Regardless the final shape, the “real estate” unit, called module, is always square.
The size id, number of row and columns as well as the data capacity are listed in the table below.
Table 10.7. Data Matrix Symbol Sizes
Size ID | Symbol Size | Data Capacity | ||||
---|---|---|---|---|---|---|
Enum | Value | Row | Column | Numeric | Alpha-numeric | Binary |
mbxDMTargetSize_10X10 | 30 | 10 | 10 | 6 | 3 | 1 |
mbxDMTargetSize_12X12 | 1 | 12 | 12 | 10 | 6 | 3 |
mbxDMTargetSize_14X14 | 2 | 14 | 14 | 16 | 10 | 6 |
mbxDMTargetSize_16X16 | 3 | 16 | 16 | 24 | 16 | 10 |
mbxDMTargetSize_18X18 | 4 | 18 | 18 | 36 | 25 | 16 |
mbxDMTargetSize_20X20 | 5 | 20 | 20 | 44 | 31 | 20 |
mbxDMTargetSize_22X22 | 6 | 22 | 22 | 60 | 43 | 28 |
mbxDMTargetSize_24X24 | 7 | 24 | 24 | 72 | 52 | 34 |
mbxDMTargetSize_26X26 | 8 | 26 | 26 | 88 | 64 | 42 |
mbxDMTargetSize_32X32 | 9 | 32 | 32 | 124 | 91 | 60 |
mbxDMTargetSize_36X36 | 10 | 36 | 36 | 172 | 127 | 84 |
mbxDMTargetSize_40X40 | 11 | 40 | 40 | 228 | 169 | 112 |
mbxDMTargetSize_44X44 | 12 | 44 | 44 | 288 | 214 | 142 |
mbxDMTargetSize_48X48 | 13 | 48 | 48 | 348 | 259 | 172 |
mbxDMTargetSize_52X52 | 14 | 52 | 52 | 408 | 304 | 202 |
mbxDMTargetSize_64X64 | 15 | 64 | 64 | 560 | 418 | 278 |
mbxDMTargetSize_72X72 | 16 | 72 | 72 | 736 | 550 | 366 |
mbxDMTargetSize_80X80 | 17 | 80 | 80 | 912 | 682 | 454 |
mbxDMTargetSize_88X88 | 18 | 88 | 88 | 1152 | 862 | 574 |
mbxDMTargetSize_96X96 | 19 | 96 | 96 | 1392 | 1042 | 694 |
mbxDMTargetSize_104X104 | 20 | 104 | 104 | 1632 | 1222 | 814 |
mbxDMTargetSize_120X120 | 21 | 120 | 120 | 2100 | 1573 | 1048 |
mbxDMTargetSize_132X132 | 22 | 132 | 132 | 2608 | 1954 | 1302 |
mbxDMTargetSize_144X144 | 23 | 144 | 144 | 3116 | 2335 | 1556 |
mbxDMTargetSize_8X18 | 24 | 8 | 18 | 10 | 6 | 3 |
mbxDMTargetSize_8X32 | 25 | 8 | 32 | 20 | 13 | 8 |
mbxDMTargetSize_12X26 | 26 | 12 | 26 | 32 | 22 | 14 |
mbxDMTargetSize_12X36 | 27 | 12 | 36 | 44 | 31 | 20 |
mbxDMTargetSize_16X36 | 28 | 16 | 36 | 64 | 46 | 30 |
mbxDMTargetSize_16X48 | 29 | 16 | 48 | 98 | 72 | 47 |
In Barcode DLL you use DataMatrixTargetSizeID property to set the size
you desire. If the property is set to 0
, Barcode DLL picks
up the size that fits the data encoded.
Previous to version 3.2, when DataMatrixTargetSizeID is too small to encode the whole data, Barcode DLL automatically increases the overall size. This behavior has changed in version 3.2. Now the progrom reports an error instead.
If DataMatrixTargetSizeID is more than holding the data, extra padding characters are added to the barcode. It is sometimes desirable if you want to have all the symbols created have the same size at the same time the data encoded vary from symbol to symbol.
The property DataMatrixModuleSize determines both the width and height of the smallest unit - a module. By default it is 20 mils. Same as all other length properties, the real value depends on Measurement.
Data Matrix is capable of encoding all characters in a single-byte character set, plus some symbol-specific characters. Depending on the programming environment you may need tilde codes to escape some characters. When creating data matrix barcodes, you can use the following tilde codes:
- ~dnnn
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.
- ~1
Represents a
FNC1
character. The tilde escape sequence can appear anywhere in the input.- ~2
Indicates that a structural append control block follows. The
~2
tilde codes format is a Morovia extension.- ~3
Represents a symbol character which means that message followed is used for reader programming. This escape sequence must appear at the beginning of the input.
- ~5
Represents a symbol character which encodes Macro 5 abbreviation. Must appear at the beginning of the message.
- ~6
Represents a symbol character which encodes Macro 6 abbreviation. Must appear at the beginning of the input.
- ~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
Represents a character value from 0 to 26. Replace the X like in the following example
~@
means character ascii 0,~A
means character 1,~B
means character 2,~C
means character 3 ...
Data Matrix provides a way of abbreviating two industry specific header and trailer in one symbol character. This feature exists to reduce the overall symbol size. They must appear at the beginning of the input. You can use ~5 and ~6 to escape them respectively.
Table 10.8. Macro 5 and 6
Tilde Sequence | Name | Interpretation | |
---|---|---|---|
header | trailer | ||
~5 | 05 Macro | [)>[RS]05[GS] | [RS][EOT] |
~6 | 06 Macro | [)>[RS]06[GS] | [RS][EOT] |
ECI was introduced to allow output data stream to have different interpretations different from the default character set (ISO8859-1). Since version 3.2, Barcode DLL has been 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 of 10
, enter ~7000010
.
The structural append feature allows up to 16 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 16.
Total number of symbols (TS). This value indicates the number of total symbols. Can be any number between 1 and 16. The value should be consistent among all symbols in the group.
File Identification Number(FID). Identify the symbol group. This number must remain the same among all the symbols in the group.
The tilde code sequence is expressed in the following format:
~2[SI][FID][TS]
For example, tilde code sequence ~1[1][126][6]
indicates that the current symbol belongs to a group with
file identification number as 126, and there are 6 symbols
in total in this group.
The ~2
tilde code sequence must appear at the end of
the input. All three fields are required and must be
enclosed with square brackets ([ and ])
and must follow the tilde code ~2
.
File ID (FID)
The File ID is a number remaining the constant among
all symbols in a group. It uniquely identifies the symbol
group. The value for this field should be between 1
and 64516
.
Sequence Indicator (SI)
Sequence Indicator is the 1-based index number of the current symbol. In a group with total 10 symbols, the first symbol has the SI of 1 and the last has the SI of 10.
Total Number of Symbols
The Total Number of symbols indicates how many symbols in the group.
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.
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.9. 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 |
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.

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]
When creating Maxicode symbols, you can use the following tilde codes:
Table 10.10. 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.
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
.
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
.
[2] Published in year 2000, this standard is relative new to the industry. Not all scanners in the market support this feature.
[3] As UCC/EAN orgnization changed its name to GS1, now the symbology is also called as GS1-128.
[4] Also referred as GTIN (Global Trade Item Number)
.[5] This table was updated in version 3.4 to reflect the changes made since the first version came out.
[6] Dubbed as “GS1 DataBar Sunrise 2010.” For more information, see http://www.gs1.org/databar/.
[7] A DataBar Expanded symbol can hold 22 symbol characters. Setting PDFMaxCols to 22 or a large number effectively creates non-stacked barcodes.