- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Intelligent Mail, also known as IM, the 4-State Customer Barcode, is a postal barcode adopted by the United State Postal Servicr for sorting and tracking letters and flats.
Generate and create Intelligent Mail barcode using Java is one of the functions in OnBarcode's
Barcode for Java Generating Java library (jar file), which supports
generating & printing Intelligent Mail and 20+ other linear & 2D bar codes in Java application and software.
Intelligent Mail Generator and Reader library, SDK & application
Intelligent Mail Generator components and software include
.NET Intelligent Mail,
C# Intelligent Mail,
VB.NET Intelligent Mail,
ASP.NET Intelligent Mail,
Intelligent Mail Generator.
This document is providing a detailed Java sample source code about generating Intelligent Mail barcodes in Java class using
Java Barcode generation component.
Complete Intelligent Mail custmoization settings is included in
Java Intelligent Mail generating guide.
Generating Intelligent Mail barcode in Java class example:
Onecode barcode = new Onecode(); /* Intelligent Mail OneCode Valid data char set: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Digits) USPS OneCode Valid data length: 20, 25, 29, 31 digits only */ barcode.setData("01234567890123456789"); // Intelligent Mail Unit of Measure, pixel, cm, or inch barcode.setUom(IBarcode.UOM_PIXEL); // Intelligent Mail barcode bar module width (X) in pixel barcode.setX(3f); // Intelligent Mail barcode bar module height (Y) in pixel barcode.setY(75f); // barcode image margins barcode.setLeftMargin(0f); barcode.setRightMargin(0f); barcode.setTopMargin(0f); barcode.setBottomMargin(0f); // barcode image resolution in dpi barcode.setResolution(72); // disply barcode encoding data below the barcode barcode.setShowText(true); // barcode encoding data font style barcode.setTextFont(new Font("Arial", 0, 12)); // space between barcode and barcode encoding data barcode.setTextMargin(6); // barcode displaying angle barcode.setRotate(IBarcode.ROTATE_0); barcode.drawBarcode("C:\\onecode.gif");