.NET Barcode for WinForms          ASP.NET Barcode          .NET Barcode Reader          Java Barcode          Java Barcode Reader
Home > .NET Barcode for Winforms > Linear Barcode Generator for WinForms - POSTNET Generator

USPS Postnet Barcode Maker for .NET WinForms Projects

Barcode image creating SDK for USPS Postnet barcode generation in .NET Windows applications

Generate and print Postnet barcode in .NET Windows Forms Applications using .NET Forms Barcode Control

  • Create POSTNET barcodes in .NET Windows Forms projects

  • Support C#, VB.NET, Managed C++ and Delphi for .NET

  • Completely built in C#.NET, VB.NET

  • Support high-quality GIF, BMP, PNG, JPEG/JPG & TIFF POSTNET barcode formats

  • Support to rotate POSTNET barcodes into 0, 90, 180, 270 degrees

  • Easy to integrated in Microsoft Visual Studio2005/2008/2010

  • Automatically add checksum digit support

  • Multiple barcode options are provided for customizing POSTNET size, color, and font, etc

  • Human-readable text can be enabled or disabled

  • Add option ShortTallRatio to set the proportion of the short bar to the tall one in POSTNET

  • Mature & reliable barcode generating component

  • Royalty free with the purchase of a Developer License

Postnet Barcode Generator Control for .NET WinForms Applictions - Overview

.NET POSTNET generator for Winforms is a flexible and robust barcode generating, which aims to generate and create POSTNET barcode in .NET Windows Forms applications in an easy way. It enables to integrate barcode generating component into Visual Studio2005/2008/2010. .NET 2.0/3.0/3.5 and later version are supported.

.NET POSTNET generator for Winforms are easy to draw high-quality POSTNET barcode images into GIF, BMP, PNG, JPEG/JPG & TIFF formats and other .NET Graphics, Stream & Bitmap objects. Rich barcode options are provides for you to customize barcode appearance and text related properties, such as barcode size, barcode foreground and background color, etc. Royalty-free developer license are provided with this generator.

POSTNET information:

POSTNET, short for Postal Numeric Encoding Technique, is invented by United Stated Postal Service (USPS) to improve efficiency of mail sorting and mail routing. Like PLANET, it encodes data by heights and that is why all the bars in symbology are in the same width but in different heights. Each of those short and high bars represents a binary value, and 5 bars together make a single character. POSTNET barcode is constructed of a frame bar encoded as 1; 5, 9, or 11 characters properly encoded; a check digit and a final frame bar encoded as 1. The check digit in POSTNET barcode is always calculated on modulo 10.

.NET POSTNET generator for Winforms encodes:

  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
According to POSTNET specification, this generator encodes 5, 6, 9, or 11 digits only, excluding the last checksum digit.

Development Environment

  • Windows Forms Application (design-time and runtime support)

  • Console Application (runtime support)

  • Windows Service (runtime support)

  • Class Library (runtime support)

Create Postnet barcode using .NET Windows Forms Barcode Creator Component

Install and register .NET barcode generator control in .NET projects for Postnet barcode generation
  • Download Avapose.com trial package and unzip

  • Copy Avapose.Barcode.Encoder.WinForms.dll to your Winforms project folder
    (Do not copy .dll to .NET bin directory, Visual Studio will do so.)

  • Add Avapose.Barcode.Encoder.WinForms.dll to your Winforms project reference

  • Add Winforms Control to your Visual Studio Toolbox.

  • 1. Right click .NET Visual Studio Toolbox, select menu Choose Items...

    2. In "Choose Toolbox Items" form, click button "Browse...", and select dll
        Avapose.Barcode.Encoder.WinForms.dll

Generate, print POSTNET barcodes with C# class

BarCode barcode = new BarCode();

aa.Symbology = Symbology.Postnet;

aa.Data = "75257";

aa.BarcodeImageWidth = 175;

aa.BarcodeImageHeight = 50;

aa.X =1;

aa.Y = 80;

aa.AutoResize = true;

aa.draw("...\postnet_csharp.gif");


Generate, print POSTNET barcodes with VB.NET class

Dim barcode As Avapose.Barcode.Encoder.ClassLibrary.BarCode = New Avapose.Barcode.Encoder.ClassLibrary.Barcode

barcode.Symbology = Avapose.Barcode.Encoder.ClassLibrary.Symbology.Postnet

barcode.Data = "65196"

barcode.BarcodeImageWidth = 175

barcode.BarcodeImageHeight = 50

barcode.X = 1

barcode.Y = 60

barcode.AutoResize = True

barcode.draw("...\postnet_vb.gif")


 

 

Postnet Barcode Properties and Methods using .NET Forms Barcode Generator

Category : Basic

Properties Value
Comments
Type Default
Data string "128"


POSTNET Valid value to encode:

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

According to POSTNET specification, this generator encodes 5, 6, 9, or 11 digits only, excluding the last checksum digit.

Symbology
Symbology
Code128Auto

Linear barcode symbology type.

Set the value to Symbology.Postnet.

EnableCheckSum
bool
false

EnableCheckSum property is not applied here. .NET Barcode will automatically add one checksum character.

Category : POSTNET Special

Properties Value
Comments
Type Default

ShortTallRatio

float
0.4f

Short bar vs tall bar (Y) ratio

Category : Barcode Size Related

Properties Value
Comments
Type Default
AutoResize

bool
false

Set AutoResize property to true, the generated barcode image can be resized automatically.

UOM
UnitOfMeasure
Pixel

Unit of meature for all size related settings in the library.

Valid values:
  • UnitOfMeasure.Pixel
  • UnitOfMeasure.Cm
  • UnitOfMeasure.Inch

X float 2

Bar module (narrow bar) width of barcode, default is 2 pixel

Y float 75

Bar module height of barcode, default is 75 pixel

BarcodeImageWidth float 0

Barcode image width.

Be sure barcodeWidth setting is larger than the barcode required minimum width, otherwisethe library will automatically reset to barcode minimum width.

BarcodeImageHeight float 0

Barcode image height.

Be sure barcodeHeight setting is larger than the barcode required minimum height, otherwise the library will automatically reset to barcode minimum height.

MarginLeft float 0

Left margin size of barcode image.

MarginRight float 0

Right margin size of barcode image.

MarginTop float 0

Top margin size of barcode image.

MarginBottom
float 0

Bottom margin size of barcode image.

DPI int 72

Barcode image resolution in DPI
(Dots per inch).

Angle Angle Degree0

Barcode image orientation can be rotated in this library.

Valid values:
  • Angle.Degree0
  • Angle.Degree90
  • Angle.Degree180
  • Angle.Degree270

Category : Barcode Colors

Properties Value
Comments
Type Default
BackgroundColor
Color
white

Set BackgroundColor property to change background color of barcode image

ForegroundColor
Color
black


Set ForegroundColor property to change foreground color barcode image

Category : Font Style

Properties Value
Comments
Type Default
ShowText
bool
true


True: show text under the barcode

False: hide text under the barcode

TextFont
Font
new Font ("Arial",10pt,
FontStyle.Regular)

Set TextFont property to change font style of barcode text
TextMargin
float
6

Set TextMargin property to change space between barcode and barcode data text, default is 6 pixel


ShowCheckSum Char

bool true

True: show checksum digit character;

False: hide checksum digit character.

TextColor Color black

Set TextColor property to change barcode text color

Category : Image Format

Properties Value
Comments
Type Default
ImageFormat
Format
gif

Barcode image encoding type,including Jpeg, Png, Tiff, Bmp, Emf, Exif, Icon and Memory Bmp.

Methods

// create and draw to image file
public void draw(string filename)

// create, draw, paint barcode on Graphics object
public void draw(Graphics graphics)

// create, draw, paint barcode on Bitmap object
public Bitmap draw()

// create, draw, paint barcodeon Stream object
public void draw(Stream fileStream)

// create, draw, paint barcode on byte[] object
public byte[] drawOutputAsBytes()