KA.Barcode for .NET Suite
How to Generate Intelligent Mail in C# Application
How to generate linear USPS Intelligent Mail/Onecode in C#, ASP.NET web applications, and winforms
  • Easy to use control written 100% in managed code of Visual C#.NET
  • Support 1D Intelligent Mail barcode generation in winforms, ASP.NET web applications
  • Programmatically generate Intelligent Mail with Visual C#.NET class & console applications
  • Simple to control Intelligent Mail barcode size though bar width, barcode width, barcode height with C#
  • Allow Intelligent Mail images rotation in 0, 90, 180 or 270 degrees
  • Support customization for the human-readable-text, such as font, size, style, etc in C#
  • Light-weight barcode dll library supporting over 20 linear & matrix barcodes
  • Mature and easy-to-install barcoding packaged used world-wide
KA.Barcode Generator for .NET Suite allows developers to easily add USPS Intelligent Mail (Onecode) barcode generation functionality into .NET projects in Visual C#.NET class library, ASP.NET web applications, Crystal Reports, Reporting Services, etc. This page provides details for USPS Intelligent Mail generation in C#.NET with demo code.
6. Double-click the barcode image object to make further adjustment using C# .NET coding. using KeepAutomation.Barcode.Bean; BarCode ....
Barcode return images in Visual C#.NET, Visual Basic ....
Microsoft Windows XP; Microsoft Visual Studio 2005; Visual C#.NET. 1D & 2D Barcode Creation in SSRS Using C# Class. ....
NET. How to Generate Barcodes in RDLC Using C#.NET. ....
more>
USPS Intelligent Mail Introduction
Intelligent Mail is a linear barcode symbology also named USPS Intelligent Mail Barcode, OneCode 4CB, USPS 4CB, USPS OneCode Solution Barcode, USPS IM.
  • Intelligent Mail Encodable Character Set: Numeric digits 0-9
  • Intelligent Mail Data Length: 20, 25, 29 or 31 numeric digits
Intelligent Mail Barcode Generation in C#.NET Class

How to Install Intelligent Mail Barcode Control Library into .NET

  1. 1.
  2. 2.
    Add "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll" to reference
  3. 3.
    Add the above two barcode control library SDKs into Visual Studio .NET ToolBox

How to Generate Intelligent Mail in .NET with Free C# Demo Code

using KeepAutomation.Barcode.Bean;

//Create BarCode object in C#
BarCode postnet= new BarCode();

//Set barcode symbology type to Intelligent Mail
intelligentmail. Symbology = KeepAutomation.Barcode.Symbology. IntelligentMail;

//Set Intelligent Mail encoding valid data: numeric digits 0-9.
Length: 20, 25, 29 or 31 digits only.
intelligentmail.CodeToEncode = "12345678901234567890";

// Set Intelligent Mail image size

// Unit of measure: pixel, cm or inch.
intelligentmail.BarcodeUnit = BarcodeUnit.Pixel;
// Intelligent Mail image resolution in dpi
intelligentmail.DPI = 72;
// Intelligent Mail bar module width (X)
intelligentmail.X = 3;
// Intelligent Mail bar module height (Y)
intelligentmail.Y = 60;
// Intelligent Mail barcode image width
intelligentmail. BarCodeWidth=200;
// Image left margin size, minimum 10X.
intelligentmail.LeftMargin = 0;
// Image right margin size, minimum 10X.
intelligentmail.RightMargin = 0;
// Image top margin size, minimum10X.
intelligentmail.TopMargin = 0;
// Image bottom margin size, minimum 10X.
intelligentmail.BottomMargin = 0;
// Orientation: 90, 180 or 270 degrees.
intelligentmail.Orientation = Orientation.Degree0;

// Set Intelligent Mail human readable text style

// Display human readable text
intelligentmail.DisplayText = true;
intelligentmail.TextFont = new Font("Arial", 10f, FontStyle.Regular);
// Space between barcode and text
intelligentmail.TextMargin = 6;
// Generate Intelligent Mail barcodes in image GIF format
intelligentmail.generateBarcodeToImageFile("barcode-intelligentmail-csharp.gif");

// Create Intelligent Mail barcodes in Stream object
intelligentmail.generateBarcodeToStream(".NET System.IO.Stream Object");

// Draw & Print Intelligent Mail barcodes to Graphics object
intelligentmail.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object");

// Generate Intelligent Mail barcodes & write to byte[]
byte[] barcodeInBytes = intelligentmail.generateBarcodeToByteArray();

// Generate Intelligent Mail barcodes & encode to System.Drawing.Bitmap object
Bitmap barcodeInBitmap = intelligentmail.generateBarcodeToBitmap();

Other image formats including PNG, BMP, TIFF and JPG are also available to suit your needs.