C#. POSTNET Generator Data Encoding Tutorial

Sample source code to input valid data and generate linear POSTNET images in C# .NET


 

C# POSTNET Introduction

Postnet, also known as USPS POSTNET Barcode, USPS POSTal Numeric Encoding Technique Barcode, is a delivery point barcodes adopted by United States Postal Services.

C# POSTNET barcode is one function of OnBarcode��s Barcode for .NET generation control, which provides an easy way for creating POSTNET barcodes in Visual C#.NET programs by easily installing & integrating barcode POSTNET generation library SDK into C# developments. High-quality POSTNET barcodes to jpeg, gif, png, tiff, bitmap files in C# program.

This article provides a complete demo for POSTNET data encoding in Visual C#.NET class with C#.NET component.

OnBarcode C# Barcode Generator is designed to generate, create POSTNET and other linear & 2d barcodes in Microsoft Word. Here are some more tutorials for C# POSTNET generation concerning size & image setting.



Encode POSTNET Valid Character in C#.NET

POSTNET is a numeric-only linear barcodes.

POSTNET valid character set:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Linear barcode = new Linear();

barcode.Type = BarcodeType.POSTNET;

barcode.Data = "978123456789";

barcode.BarcodeWidth = 200;

barcode.Format = ImageFormat.Png;

barcode.drawBarcode("c:/postnet.png");

Modify POSTNET Valid Length in C#.NET

POSTNET is a fixed-length linear barcode symblogy. It can be encoded into 5, 6, 9 or 11 digits with a check digit in the end.

Set POSTNET Barcodes in 5-digit length

A 5 digit (plus check digit) barcode, containing the basic ZIP Code only, referred to as the "A" code. 32 bars total.

Linear barcode = new Linear();

barcode.Type = BarcodeType.POSTNET;

barcode.Data = "12345";

barcode.BarcodeWidth = 200;

barcode.Format = ImageFormat.Png;

barcode.drawBarcode("c:/postnet.png");

Make POSTNET Barcodes in 6-digit length

A 6 digit (plus check digit) barcode, containing the last 2 digits of the ZIP Code and the 4 digits of the ZIP+4 Code, referred to as a "B" code. 37 bars total.

Linear barcode = new Linear();

barcode.Type = BarcodeType.POSTNET;

barcode.Data = "123456";

barcode.BarcodeWidth = 200;

barcode.Format = ImageFormat.Png;

barcode.drawBarcode("c:/postnet.png");

Print POSTNET Barcodes in 9-digit length

A 9 digit (plus check digit) barcode, containing the ZIP Code and ZIP+4 Code, referred to as the "C" code. 52 bars total.

Linear barcode = new Linear();

barcode.Type = BarcodeType.POSTNET;

barcode.Data = "123456789";

barcode.BarcodeWidth = 200;

barcode.Format = ImageFormat.Png;

barcode.drawBarcode("c:/postnet.png");

Generate POSTNET Barcodes in 11-digit length

An 11 digit (plus check digit) barcode, containing the ZIP Code, ZIP+4 Code, and the delivery point code. 62 bars total.

Linear barcode = new Linear();

barcode.Type = BarcodeType.POSTNET;

barcode.Data = "123456789012";

barcode.BarcodeWidth = 200;

barcode.Format = ImageFormat.Png;

barcode.drawBarcode("c:/postnet.png");









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.