Postnet (Postal Numeric Encoding Technique)
is a barcode symbology that is used by the United States Postal
Service to assist in directing mail. The Postnet barcode can
represent a five-digit ZIP Code( 32 bars),a nine-digit ZIP+4
code(52 bars), or an eleven-digit delivery point code( 62
bars).
Encoding
Postnet barcodes encodes the data in half- and full-height bars.
And the barcode always starts and ends with a full bar (often
called a guard rail) and each individual digit is represented by a
set of five bars using a two-out-of-five code. In Postnet, the two
bars are full bars.
Check Sum
The check digit is based on Mod 10 algorithm. The value of the
check digit is that when added to the sum of other digits in the
barcode, results in a total that is multiple of 10. For example,
the check digit for zip code 54321-6789 is 5 since
1+2+3+4+5+6+7+8+9=45 which adds check digit 5 result a sum 50.
Postnet Character Set
The Postnet barcode is numeric only.
USPS Postnet Properties
Besides the properties to general barcode, the following properties
belongs to Postnet:
PostnetHeightTall gets or sets tall bar
height for Postnet, Planet or USPS Intelligent Mail. Default is
0.127 inch.
PostnetHeightShort gets or sets short bar
height for Postnet, Planet or USPS Intelligent Mail. Default is
0.05 inch.
PostnetSpacing gets or sets space the for
Postnet, Planet or USPS Intelligent Mail. Default is 0.026
inch.
Postnet examples by using ezBarcodeComponent
[C#]
using ezBarcodeComponent.Winform;
//create barcode class
Barcode barcode1 = new Barcode();
//Specify the CodeData to encode
barcode1.CodeData = "543216789";
//Set the Symbology to Postnet
barcode1.Symbology = Symbologies.Postnet;
barcode1.CheckCharacter= true;
barcode1.CheckCharacterInText = true;
//Save the image
barcode1.SaveImageAs("Postnet.gif", System.Drawing.Imaging.ImageFormat.Gif);
[Vb.net]
'create barcode class
Dim barcode1 As New Barcode
'Specify the CodeData to encode
barcode1.CodeData = "543216789"
'Set the Symbology to Postnet
barcode1.Symbology = Symbologies.Postnet
barcode1.CheckCharacter= True
barcode1.CheckCharacterInText = True
'Save the image
barcode1.SaveImageAs("Postnet.gif", System.Drawing.Imaging.ImageFormat.Gif)
Example of Postnet barcode images. The last digit is
the check sum digit.