Zint: Manual

6. Types of symbology

6.5 4-State Postal Codes

6.5.1 Australia Post 4-State Symbols

6.5.1.1 Customer Barcodes
zint -b AUSPOST --compliantheight -d "96184209"

Australia Post Standard Customer Barcode, Customer Barcode 2 and Customer Barcode 3 are 37-bar, 52-bar and 67-bar specifications respectively, developed by Australia Post for printing Delivery Point ID (DPID) and customer information on mail items. Valid data characters are 0-9, A-Z, a-z, space and hash (#). A Format Control Code (FCC) is added by Zint and should not be included in the input data. Reed-Solomon error correction data is generated by Zint. Encoding behaviour is determined by the length of the input data according to the formula shown in the following table:

Australia Post Input Formats
Input Length Required Input Format Symbol Length FCC Encoding Table
8 99999999 37-bar 11 None
13 99999999AAAAA 52-bar 59 C
16 9999999999999999 52-bar 59 N
18 99999999AAAAAAAAAA 67-bar 62 C
23 99999999999999999999999 67-bar 62 N
6.5.1.2 Reply Paid Barcode
zint -b AUSREPLY --compliantheight -d "12345678"

A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) which requires an 8-digit DPID input.

6.5.1.3 Routing Barcode
zint -b AUSROUTE --compliantheight -d "34567890"

A Routing version of the Australia Post 4-State Barcode (FCC 87) which requires an 8-digit DPID input.

6.5.1.4 Redirect Barcode
zint -b AUSREDIRECT --compliantheight -d "98765432"

A Redirection version of the Australia Post 4-State Barcode (FCC 92) which requires an 8-digit DPID input.

6.5.2 Dutch Post KIX Code

zint -b KIX --compliantheight -d "2500GG30250"

This symbology is used by Royal Dutch TPG Post (Netherlands) for Postal code and automatic mail sorting. Data input can consist of numbers 0-9 and letters A-Z and needs to be 11 characters in length. No check digit is included.

6.5.3 Royal Mail 4-State Customer Code (RM4SCC)

zint -b RM4SCC --compliantheight -d "W1J0TR01"

The RM4SCC standard is used by the Royal Mail in the UK to encode postcode and customer data on mail items. Data input can consist of numbers 0-9 and letters A-Z and usually includes delivery postcode followed by house number. For example "W1J0TR01" for 1 Piccadilly Circus in London. Check digit data is generated by Zint.

6.5.4 Royal Mail 4-State Mailmark

zint -b MAILMARK --compliantheight -d "1100000000000XY11"

Developed in 2014 as a replacement for RM4SCC this 4-state symbol includes Reed Solomon error correction. Input is a pre-formatted alphanumeric string of 22 (for Barcode C) or 26 (for Barcode L) characters, producing a symbol with 66 or 78 bars respectively. The rules for the input data are complex, as summarized in the following table.

Royal Mail Mailmark Input Fields
Format Version ID Class Supply Chain ID Item ID Destination+DPS
1 digit 1 digit 1 alphanum. 2 digits (C) or 8 digits 9 alphanumerics
(0-4) (0-3) (0-9A-E) 6 digits (L) (1 of 6 patterns)

The 6 Destination+DPS (Destination Post Code plus Delivery Point Suffix) patterns are 'FNFNLLNLS', 'FFNNLLNLS', 'FFNNNLLNL', 'FFNFNLLNL', 'FNNLLNLSS' and 'FNNNLLNLS', where 'F' stands for full alphabetic (A-Z), 'L' for limited alphabetic (A-Z less 'CIKMOV'), 'N' for numeric (0-9), and 'S' for space.

Four of the permitted patterns include a number of trailing space characters - these will be appended by Zint if not included in the input data.

6.5.5 USPS Intelligent Mail

zint -b USPS_IMAIL --compliantheight -d "01234567094987654321-01234"

Also known as the OneCode barcode and used in the US by the United States Postal Service (USPS), the Intelligent Mail system replaced the POSTNET and PLANET symbologies in 2009. Intelligent Mail is a fixed length (65-bar) symbol which combines routing and customer information in a single symbol. Input data consists of a 20-digit tracking code, followed by a dash (-), followed by a delivery point zip-code which can be 0, 5, 9 or 11 digits in length. For example all of the following inputs are valid data entries:

  • "01234567094987654321"
  • "01234567094987654321-01234"
  • "01234567094987654321-012345678"
  • "01234567094987654321-01234567891"

6.5.6 Japanese Postal Code

zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"

Used for address data on mail items for Japan Post. Accepted values are 0-9, A-Z and dash (-). A modulo 19 check digit is added by Zint.

6.5.7 DAFT Code

zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers=256

This is a method for creating 4-state codes where the data encoding is provided by an external program. Input data should consist of the letters 'D', 'A', 'F' and 'T' where these refer to descender, ascender, full (ascender and descender) and tracker (neither ascender nor descender) respectively. All other characters are invalid. The ratio of the tracker size to full height can be given in thousandths (permille) using the --vers option (API option_2). The default value is 250 (25%).

For example the following

zint -b DAFT -d AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF --height=8.494 --vers=256

produces the same barcode (see 6.5.3 Royal Mail 4-State Customer Code (RM4SCC)) as

zint -b RM4SCC --compliantheight -d "W1J0TR01"