Android Postnet Generator

Barcode Postnet Generation in Android

POSTNET (Postal Numeric Encoding Technique) is a barcode symbology that is used by the United States Postal Service to assist in directing mail. The ZIP Code or ZIP+4 code is encoded in half- and full-height bars. Most often, the delivery point is added, usually being the last two digits of the address or PO box number.

The barcode starts and ends with a full bar (often called a guard rail or frame bar and represented as the letter "S" in the USPS TrueType Font) and has a check digit after the ZIP or ZIP+4. The encoding table is shown on the right.

Each individual digit is represented by a set of five bars, two of which are full bars (i.e. two-out-of-five code). The full bars represent "on" bits in a pseudo-binary code in which the places represent, from left to right: 7, 4, 2, 1, 0. (Though in this scheme, zero is encoded as 11 decimal, or "binary" 11000.)