Java Postnet Generator Library SDK Integration & Developer Guide
Generate barcode Postnet images in Java class, Servlet, JSP, J2EE with complete sample Java source code
- Generate, create Postnet in Java applications
- Easy to install & integrate barcode Postnet generation library SDK into Java developments
- Generate over 30 linear, 2d barcode images in Java including
Java QR Code,
Java OneCode,
Java PLANET,
Java Data Matrix,
Java Code 128
- Generate Postnet images in Java class, Java Bean, Swing, Applet, J2SE
- Create barcode Postnet in Java web application, including Servlet, JSP, EJB, Tomcat, JBoss, J2EE
- Create & Print Postnet barcode in BIRT reports designer and BIRT report runtime
- Generate & Draw Postnet in Jasper Reports, iReport
- Encode Postnet images to jpeg, eps, gif, png, tiff, bitmap files in Java program
Index
Java Postnet Generator 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.
Generate and create Postnet barcode using Java is one of the functions in OnBarcode's
Barcode for Java Generating Java library (jar file), which supports
generating & printing Postnet and 20+ other linear & 2D bar codes in Java application and software.
Postnet Generator and Reader library, SDK & application
Postnet Generator components and software include
.NET POSTNET Generator,
C# POSTNET Generator,
VB.NET POSTNET Generator,
ASP.NET POSTNET Generator,
POSTNET Generator.
This document is providing a detailed Java sample source code about generating Postnet barcodes in Java class using
Java Barcode generation component.
Complete Postnet custmoization settings is included in
Java Postnet generating guide.
Generate POSTNET Barcodes in Java
Generating POSTNET barcode in Java class example:
Postnet barcode = new Postnet();
/*
POSTNET Valid data char set:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Digits)
POSTNET Valid data length: 5, 6, 9, 11 digits only, excluding the last checksum digit
*/
barcode.setData("01234");
// POSTNET Short bar vs high bar ratio
barcode.setShortTallRatio(0.4f);
// Unit of Measure, pixel, cm, or inch
barcode.setUom(IBarcode.UOM_PIXEL);
// barcode bar module width (X) in pixel
barcode.setX(3f);
// 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:\\postnet.gif");
Java Barcode Generation Demo Source Codes: