KA.Barcode for .NET Suite
How to Generate POSTNET in C# application
How to generate & draw POSTNET barcode images in C#, ASP.NET web applications, and windows forms

C# barcode creator: generate, create POSTNET barcode from string with free c# example



  • POSTNET generation in C# .NET applications
  • Easy-to-use & integrate controls completely written in managed C#
  • Generate POSTNET and other linear & 2D barcodes in C# class, such as QR Code in C#, PDF 417 in C#, Planet in C#, Codabar in C#, ISBN in C#, EAN-8 in C#, RM4SCC in C#, ITF 14 in C#
  • Draw POSTNET in C# ASP.NET web forms
  • Create POSTNET in .NET Windows Forms applications
  • Generate POSTNET in stream object, in graphics object, and image formats
  • Print and save POSTNET as gif, jpeg, png, tiff, and bitmap files using C#
POSTNET, is also named as USPS POSTNET Barcode, USPS Postal Numeric Encoding Technique Barcode, Delivery Point Barcode (DPBC), Postnet 3 of 5.

C# POSTNET barcode generator is a .NET Postnet generation function of KeepAutomation .NET Barcode Suite, a high quality barcode generator component which enables you to easily and efficiently generate POSTNET and other linear & 2D barcode types in various .NET development environments, such as Windows Forms and ASP.NET, etc.

With .NET Barcode Generator Suite you can instantly generate and save POSTNET in a variety of image formats in C# program, including PNG, BMP, GIF, JPEG, TIFF and so on. For more details about POSTNET C# Generation, please refer to:

POSTNET Barcode Solutions

Besides C# .NET POSTNET Generator, KeepAutomation provides other advanced Postnet barcode solutions, including

VB.NET POSTNET Generator - generating Postnet in VB.NET

Java POSTNET Generator - generating Postnet in java

Reporting Services POSTNET - generating Postnet in Reporting Services 2005, 2008

iPhone POSTNET Generator - printing Postnet barcode in iPhone

POSTNET Barcode Fonts - creating Postnet in barcode fonts

Apart from POSTNET, .NET C# Barcode Generator also supports other linear and 2D barcode symbols, including: C# Data Matrix, C# Code 2 of 5, C# Interleaved 2 of 5, C# ISSN, C# UPC-E, C# PDF 417 , etc.
Microsoft Windows XP; Microsoft Visual Studio 2005; Visual C#.NET. 1D & 2D Barcode Creation in SSRS Using C# Class. ....
Visual C#.NET. How to Generate Barcodes in Crystal Reports Using ....
Microsoft Visual Studio 2005; Visual C#.NET. How to Generate Barcodes in RDLC Using C#.NET. Download Demo Package. Download KeepAutomation Barcode...
more>

How to Generate POSTNET in C# Applications?

How to Install POSTNET Component

  • Download KeepAutomation C# POSTNET Generator

  • Add "KeepAutomation.Barcode.Web.dll" or "KeepAutomation.Barcode.Windows.dll" to your C# project reference.

    1. "project" - Add Reference" - choose "Browse" in the pop-up window
    2. locate your "KeepAutomation.Barcode.Web.dll" or "KeepAutomation.Barcode.Windows.dll" - click "OK"
    3. Now you will see "KeepAutomation.Barcode.Web" or "KeepAutomation.Barcode.Windows" under your references.

ASP.NET web pages, Windows applications, Crystal Reports, and VB.NET class library. Users may get more information about QR Code barcode data, size...
QR Code bar codes in gif, jpeg, png, tiff, and bitmap formats with C#.NET programming; Multiple properties to select such as QR Code version, data...
more>

How to Generate POSTNET in C# Class

        using KeepAutomation.Barcode.Bean;
        
        //Create BarCode object in C#
        BarCode postnet= new BarCode();  
        
        //Set barcode symbology type to Postnet              
        postnet. Symbology = Symbology. Postnet; 
         
        //Set Postnet encoding code value. Valid data: numeric digits from 0 to 9   
        Data length: 5, 6, 9, or 11 digits only without the last check digit.  
        postnet.CodeToEncode = "45126"; 
        
        //Set POSTNET image size
        
        postnet.BarcodeUnit = BarcodeUnit.Pixel;   // Unit of measure, pixel, cm and inch supported. 
        postnet.DPI = 72;                          // POSTNET image resolution in dpi
        postnet.X = 3;                             // POSTNET bar module width (X dimention)
        postnet.Y = 60;                            // POSTNET bar module height (Y dimention)
        postnet. BarCodeWidth=200;                 // POSTNET barcode image width
        postnet.LeftMargin = 0;		           // POSTNET image left margin size, minimum is 10X.
        postnet.RightMargin = 0;	           // POSTNET image right margin size, minimum is 10X.
        postnet.TopMargin = 0;		           // POSTNET image top margin size
        postnet.BottomMargin = 0;	           // POSTNET image bottom margin size
        postnet.Orientation = Orientation.Degree0; // Orientation, 90, 180, 270 degrees supported.
        POSTNET.ShortTallRatio = 0.4f;             // POSTNET short bar height vs tall bar height
        
        //Set POSTNET human readable text style
        
        postnet.DisplayText = true;                // Display human readable text
        postnet.TextFont = new Font("Arial", 10f, FontStyle.Regular);
        postnet.TextMargin = 6;                    // Space between barcode and text
        
        //Generate POSTNET barcodes in image GIF format
        postnet.generateBarcodeToImageFile("barcode-postnet-csharp.gif"); 
            
        //Create POSTNET barcodes in Stream object
        postnet.generateBarcodeToStream(".NET System.IO.Stream Object"); 
        
        //Draw & Print POSTNET barcodes to Graphics object
        postnet.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object");
        
        //Generate POSTNET barcodes & write to byte[] 
        byte[] barcodeInBytes = postnet.generateBarcodeToByteArray();
        
        //Generate POSTNET barcodes & encode to System.Drawing.Bitmap object 
        Bitmap barcodeInBitmap = postnet.generateBarcodeToBitmap();
        
        Other image formats including PNG, BMP, TIFF and JPG are also available to suit your needs.