# Zint: Manual

## 6. Types of symbology

### 6.1 One-Dimensional symbols

One-Dimensional symbols are what most people associate with the term barcode. They consist of a number of bars and a number of spaces of differing widths.

#### 6.1.1 Code 11

Developed by Intermec in 1977, Code 11 is similar to Code 2 of 5 Matrix and is primarily used in telecommunications. The symbol can encode any length string consisting of the digits 0-9 and the dash character (-). One modulo-11 check digit is calculated.

#### 6.1.2 Code 2 of 5

Code 2 of 5 is a family of one-dimensional symbols, 8 of which are supported by Zint. Note that the names given to these standards alters from one source to another so you should take care to ensure that you have the right barcode type before using these standards.

##### 6.1.2.1 Standard Code 2 of 5

Also known as Code 2 of 5 Matrix is a self-checking code used in industrial applications and photo development. Standard Code 2 of 5 will encode any length numeric input (digits 0-9).

##### 6.1.2.2 IATA Code 2 of 5

Used for baggage handling in the air-transport industry by the International Air transport Agency, this self-checking code will encode any length numeric input (digits 0-9) and does not include a check digit.

##### 6.1.2.3 Industrial Code 2 of 5

Industrial Code 2 of 5 can encode any length numeric input (digits 0-9) and does not include a check digit.

##### 6.1.2.4 Interleaved Code 2 of 5

This self-checking symbology encodes pairs of numbers, and so can only encode an even number of digits (0-9). If an odd number of digits is entered a leading zero is added by Zint. No check digit is added.

##### 6.1.2.5 Code 2 of 5 Data Logic

Data Logic does not include a check digit and can encode any length numeric input (digits 0-9).

##### 6.1.2.6 ITF-14

ITF-14, also known as UPC Shipping Container symbol or Case Code is based on Interleaved Code 2 of 5 and requires a 13 digit numeric input (digits 0-9). One modulo-10 check digit is added by Zint.

##### 6.1.2.7 Deutsche Post Leitcode

Leitcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for mailing purposes. Leitcode requires a 13-digit numerical input and includes a check digit.

##### 6.1.2.8 Deutsche Post Identcode

Identcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for mailing purposes. Identcode requires an 11-digit numerical input and includes a check digit.

#### 6.1.3 Universal Product Code (EN 797)

##### 6.1.3.1 UPC Version A

UPC-A is used in the United States for retail applications. The symbol requires an 11 digit article number. The check digit is calculated by Zint. In addition EAN-2 and EAN-5 add-on symbols can be added using the + character. For example, to draw a UPC-A symbol with the data 72527270270 with an EAN-5 add-on showing the data 12345 use the command:

`zint --barcode=34 -d 72527270270+12345`

or encode a data string with the + character included:

```
my_symbol->symbology = BARCODE_UPCA;
error = ZBarcode_Encode_and_Print(my_symbol,"72527270270+12345");
```

If your input data already includes the check digit symbology 35 can be used which takes a 12 digit input and validates the check digit before encoding.

##### 6.1.3.2 UPC Version E

UPC-E is a zero-compressed version of UPC-A developed for smaller packages. The code requires a 6 digit article number (digits 0-9). The check digit is calculated by Zint. EAN-2 and EAN-5 add-on symbols can be added using the + character as with UPC-A. In addition Zint also supports Number System 1 encoding by entering a 7-digit article number stating with the digit 1. For example:

`zint --barcode=37 -d 1123456`

or

```
my_symbol->symbology = BARCODE_UPCE;
error = ZBarcode_Encode_and_Print(my_symbol, "1123456");
```

If your input data already includes the check digit symbology 38 can be used which takes a 7 or 8 digit input and validates the check digit before encoding.

#### 6.1.4 European Article Number (EN 797)

##### 6.1.4.1 EAN-2, EAN-5, EAN-8 and EAN-13

The EAN system is used in retail across Europe and includes standards for EAN-2 and EAN-5 add-on codes, EAN-8 and EAN-13 which encode 2, 5, 7 or 12 digit numbers respectively. Zint will decide which symbology to use depending on the length of the input data. In addition EAN-2 and EAN-5 add-on symbols can be added using the + symbol as with UPC symbols. For example:

`zint --barcode=13 -d 54321`

will encode a stand-alone EAN-5, whereas

`zint --barcode=13 -d 7432365+54321`

will encode an EAN-8 symbol with an EAN-5 add-on. As before these results can be achieved using the API:

```
my_symbol->symbology = BARCODE_EANX;
error = ZBarcode_Encode_and_Print(my_symbol, "54321");
error = ZBarcode_Encode_and_Print(my_symbol,"7432365+54321");
```

All of the EAN symbols include check digits which is added by Zint.

If you are encoding an EAN-8 or EAN-13 symbol and your data already includes the check digit then you can use symbology 14 which takes an 8 or 13 digit input and validates the check digit before encoding.

##### 6.1.4.2 SBN, ISBN and ISBN-13

EAN-13 symbols (also known as bookland EAN-13) can also be produced from 9-digit SBN, 10-digit ISBN or 13-digit ISBN-13 data. The relevant check digit needs to be present in the input data and will be verified before the symbol is generated. In addition EAN-2 and EAN-5 add-on symbols can be added using the + symbol as with UPC symbols.

#### 6.1.5 Plessey

Also known as Plessey Code, this symbology was developed by the Plessey Company Ltd. in the UK. The symbol can encode any length data consisting of digits (0-9) or letters A-F and includes a CRC check digit.

#### 6.1.6 MSI Plessey

Based on Plessey and developed by MSE Data Corporation, MSI Plessey is available with a range of check digit options available by setting option_2 or by using the --ver= switch. Any length numeric (digits 0-9) input can be encoded. The table below shows the options available:

Value of option_2 | Check Digits |
---|---|

0 | None |

1 | Modulo-10 |

2 | Modulo-10 & Modulo-10 |

3 | Modulo-11 |

4 | Modulo-11 & Modulo-10 |

#### 6.1.7 Telepen

##### 6.1.7.1 Telepen Alpha

Telepen Alpha was developed by SB Electronic Systems Limited and can encode any length of ASCII text input. Telepen includes a modulo-127 check digit.

##### 6.1.7.2 Telepen Numeric

Telepen Numeric allows compression of numeric data into a Telepen symbol. Data can consist of pairs of numbers or pairs consisting of a numerical digit followed an X character. For example: 466333 and 466X33 are valid codes whereas 46X333 is not (the digit pair "X3" is not valid). Telepen Numeric includes a modulo-127 check digit which is added by Zint.

#### 6.1.8 Code 39

##### 56.1.8.1 Standard Code 39 (ISO 16388)

Standard Code 39 was developed in 1974 by Intermec. Input data can be of any length and can include the characters 0-9, A-Z, dash (-), full stop (.), space, asterisk (*), dollar ($), slash (/), plus (+) and percent (%). The standard does not require a check digit but a modulo-43 check digit can be added if required by setting option_2 = 1 or using --ver=1.

##### 6.1.8.2 Extended Code 39

Also known as Code 39e and Code39+, this symbology expands on Standard Code 39 to provide support to the full ASCII character set. The standard does not require a check digit but a modulo-43 check digit can be added if required by setting option_2 = 1 or using --ver=1.

##### 6.1.8.3 Code 93

A variation of Extended Code 39, Code 93 also supports full ASCII text. Two check digits are added by Zint.

##### 6.1.8.4 Pharmazentralnummer (PZN)

Pharmazentralnummer is a Code 39 based symbology used by the pharmaceutical industry in Germany. Pharmazentralnummer encodes a 6 digit number to which Zint will add a modulo-10 check digit.

##### 6.1.8.5 LOGMARS

LOGMARS (Logistics Applications of Automated Marking and Reading symbols) is a variation of the Code 39 symbology used by the US Department of Defence. LOGMARS encodes the same character set as Standard Code 39 and adds a modulo-43 check digit.

##### 6.1.8.6 Code 32

A variation of Code 39 used by the Italian Ministry of Health ("Ministero della SanitÃ ") for encoding identifiers on pharmaceutical products. This symbology requires a numeric input up to 8 digits in length. A check digit is added by Zint.

##### 6.1.8.7 HIBC Code 39

This option adds a leading '+' character and a trailing modulo-49 check digit to a standard Code 39 symbol as required by the Health Industry Barcode standards.

##### 6.1.8.8 Vehicle Identification Number (VIN)

This option includes a verification stage for vehicle identification numbers used in North America which include a check digit. For European vehicle identification numbers use Standard Code 39.

#### 6.1.9 Codabar (EN 798)

Also known as NW-7, Monarch, ABC Codabar, USD-4, Ames Code and Code 27, this symbology was developed in 1972 by Monarch Marketing Systems for retail purposes. The American Blood Commission adopted Codabar in 1977 as the standard symbology for blood identification. Codabar can encode any length string starting and ending with the letters A-D and containing between these letters the numbers 0-9, dash (-), dollar ($), colon (:), slash (/), full stop (.) or plus (+). No check digit is generated.

### 6.1.10 Pharmacode

Developed by Laetus, Pharmacode is used for the identification of pharmaceuticals. The symbology is able to encode whole numbers between 3 and 131070.

#### 6.1.11 Code 128

##### 6.1.11.1 Standard Code 128 (ISO 15417)

One of the most ubiquitous one-dimensional barcode symbologies, Code 128 was developed in 1981 by Computer Identics. This symbology supports full ASCII text and uses a three-mode system to compress the data into a smaller symbol. Zint automatically switches between modes and adds a modulo-103 check digit. Code 128 is the default barcode symbology used by Zint. In addition Zint supports the encoding of Latin-1 (non-English) characters in Code 128 symbols [1]. The Latin-1 character set is shown in Appendix A.

##### 6.1.11.2 Code 128 Subset B

It is sometimes advantageous to stop Code 128 from using subset mode C which compresses numerical data. The BARCODE_CODE128B option (symbology 60) suppresses mode C in favour of mode B.

##### 6.1.11.3 GS1-128

A variation of Code 128 also known as UCC/EAN-128, this symbology is defined by the GS1 General Specification. Application Identifiers (AIs) should be entered using [square bracket] notation. These will be converted to (round brackets) for the human readable text. This will allow round brackets to be used in the data strings to be encoded. Fixed length data should be entered at the appropriate length for correct encoding. GS1-128 does not support extended ASCII characters. Check digits for GTIN data (AI 01) are not generated and need to be included in the input data. The following is an example of a valid GS1-128 input:

`zint --barcode=16 -d "[01]98898765432106[3202]012345[15]991231"`

##### 6.1.11.4 EAN-14

A shorter version of GS1-128 which encodes GTIN data only. A 13 digit number is required. The GTIN check digit and AI (01) are added by Zint.

##### 6.1.11.5 NVE-18

A variation of Code 128 the "Nummer der Versandeinheit" standard includes both modulo-10 and modulo-103 check digits. NVE-18 requires a 17 digit numerical input and check digits are added by Zint.

##### 6.1.11.6 HIBC Code 128

This option adds a leading '+' character and a trailing modulo-49 check digit to a standard Code 128 symbol as required by the Health Industry Barcode standards.

##### 6.1.11.7 DPD Code

Another variation of Code 128 as used by DPD (Deutsher Paket Dienst). Requires a 28 character alphanumeric input. Zint formats Human Readable Text as specified by DPD and adds a modulo-36 check character.

#### 6.1.12 GS1 DataBar (ISO 24724)

Also known as RSS (Reduced Spaced symbology) these symbols are due to replace GS1-128 symbols in accordance with the GS1 General Specification. If a GS1 DataBar symbol is to be printed with a 2D component as specified in ISO 24723 set option_1 = 2 or use the option --mode=2 at the command prompt. See section 6.3 of this manual to find out how to generate DataBar symbols with 2D components.

##### 6.1.12.1 DataBar-14 and DataBar-14 truncated

Also known as RSS-14 this standard encodes a 13 digit item code. A check digit and application identifier of (01) are added by Zint. To produce a truncated symbol set the symbol height to a value between 32 and 13. Normal DataBar-14 symbols should have a height of 33 or greater.

##### 6.1.12.2 DataBar Limited

Also known as RSS Limited this standard encodes a 13 digit item code and can be used in the same way as DataBar-14 above. DataBar Limited, however, is limited to data starting with digits 0 and 1 (i.e. numbers in the range 0 to 1999999999999). As with DataBar-14 a check digit and application identifier of (01) are added by Zint.

##### 6.1.12.3 DataBar Expanded

Also known as RSS Expanded this is a variable length symbology capable of encoding data from a number of AIs in a single symbol. AIs should be encased in [square brackets] in the input data. This will be converted to (rounded brackets) before it is included in the human readable text attached to the symbol. This method allows the inclusion of rounded brackets in the data to be encoded. GTIN data (AI 01) should also include the check digit data as this is not calculated by Zint when this symbology is encoded. Fixed length data should be entered at the appropriate length for correct encoding. The following is an example of a valid DataBar Expanded input

`zint --barcode=31 -d "[01]98898765432106[3202]012345[15]991231"`

#### 6.1.13 Korea Post Barcode

The Korean Postal Barcode is used to encode a six-digit number and includes one check digit.

#### 6.1.14 Channel Code

A highly compressed symbol for numeric data. The number of channels in the symbol can be between 3 and 8 and this can be specified by setting the value of option_2. It can also be determined by the length of the input data e.g. a three character input string generates a 4 channel code by default. The maximum values permitted depend on the number of channels used as shown in the table below:

Channels | Minimum Value | Maximum Value |
---|---|---|

3 | 00 | 26 |

4 | 000 | 292 |

5 | 0000 | 3493 |

6 | 00000 | 44072 |

7 | 000000 | 576688 |

8 | 0000000 | 7742862 |

Note that 7 and 8 channel codes require a processor intensive algorithm to generate and so response times when generating these codes will be relatively slow.