VB.NET Postnet Generator Data Encoding Tutorial

sample source code to input valid data and generate linear Postnet images in VB.NET

VB.NET Postnet Barcode Generator Overview


VB.NET Postnet Barcode Generator is a mature linear barcode generation component designed for VB.NET developers who are necessary of adding the Postnet barcode printing functions into their .NET projects. It is compatible with the .NET 2.0, 3.0, 3.5, 4.0 and is able to create Postnet barcodes in ASP.NET Web projects, .NET WinForms apps as well as .NET reporting services (SSRS) projects using the Visual Basic .NET. It is simple to encode valid digits into the Postnet barcode symbology by Visual Basic .NET.

OnBarcode.com also provides more details about how to set Postnet barcode size and image in Barcode Generator Control on VB.NET:

 

Postnet Data Encoding in VB.NET

Postnet Valid Character Set

The Postnet barcode symbology, also known as USPS POSTNET Barcode, USPS POSTal Numeric Encoding Technique Barcode, is generally used for quickly sorting and routing of mail by the USPS, the United States Postal Service. It is often used on envelopes and business return mail.

Postnet barcode symbology encodes the data into the height of bars only instead of the width of bars and spaces. Look at the following Postnet barcode images. The Postnet encodes 5, 9, or 11 numeric information digits into the barcode symbology. Postnet barcode encodes numeric digit from 0 through 9:

Postnet Character Set: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Encode data into Postnet using VB.NET

Sample for encoding data into Postnet through VB.NET

Dim barcode As Linear = New Linear

barcode.Type = BarcodeType.POSTNET

barcode.Data = "10001"

barcode.ShortTallRatio = 0.4F

barcode.UOM = UnitOfMeasure.PIXEL

barcode.X = 1

barcode.Y = 80

barcode.LeftMargin = 0

barcode.RightMargin = 0

barcode.TopMargin = 0

barcode.BottomMargin = 0

barcode.Resolution = 96

barcode.Rotate = Rotate.Rotate0

Postnet Barcode Symbols

After encoding the data string "10001" into the Postnet barcode, it looks like the following image.



A postnet barcode is made up of two parts: Zip Code and Checksum digit. In the above image, the first five digits (10001) are Zip Code, and the last digit (8) is the check digit. The Postnet barcode is able to encode Standard Zip Code (5-digit), a Zip+4 Code (9-digit), or Delivery Point Code (11-digit), known by few people, into the barcode symbology.









OnBarcode is a market-leading provider of barcode generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides high quality tutorials and guides for various linear, 2d barcode information, such as C# Barcode, QR Code C#, QR Code VB.NET, QR Code ASP.NET, QR Code .NET, ASP.NET Barcode. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.