Java UPC-E Generator Library SDK Integration & Developer Guide
Generate barcode UPC-E images in Java class, Servlet, JSP, J2EE with complete sample Java source code
- Generate, create UPC-E in Java applications
- Easy to install & integrate barcode UPC-E generation library SDK into Java developments
- Generate over 30 linear, 2d barcode images in Java including
Java QR Code,
Java Data Matrix,
Java Code 39,
Java Code 128,
Java UPC,
Java EAN
- Generate UPC-E images in Java class, Java Bean, Swing, Applet, J2SE
- Create barcode UPC-E in Java web application, including Servlet, JSP, EJB, Tomcat, JBoss, J2EE
- Create & Print UPC-E barcode in BIRT reports designer and BIRT report runtime
- Generate & Draw UPC-E in Jasper Reports, iReport
- Encode UPC-E images to jpeg, eps, gif, png, tiff, bitmap files in Java program
Index
Java UPC-E Generator Introduction
UPC-E, also known as Universal Product Code version E, GTIN-12 with lead 0, GS1-12, UCC-12, is the short form representation of a UPC number.
Generate and create UPC-E barcode using Java is one of the functions in OnBarcode's
Barcode for Java Generating Java library (jar file), which supports
generating & printing UPC-E and 20+ other linear & 2D bar codes in Java application and software.
UPC-E Generator and Reader library, SDK & application
UPC-E Generator components and software include
.NET UPC-E Generator,
C# UPC-E Generator,
VB.NET UPC-E Generator,
ASP.NET UPC-E Generator,
UPC-E Generator.
This document is providing a detailed Java sample source code about generating UPC-E barcodes in Java class using
Java Barcode generation component.
Complete UPC-E custmoization settings is included in
Java UPC-E generating guide.
Generate UPC-E Barcodes in Java
Generating UPC-E barcode in Java class example:
UPCE barcode = new UPCE();
/*
UPC-E Valid data char set:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Digits)
UPC-E Valid data length: 6 digits only, excluding the first UPCE number system and the last checksum digit
*/
barcode.setData("012345");
// UPCE number system: 0 or 1
barcode.setUpceNumber(0);
// for UPC-E with supplement data (2 or 5 digits)
/*
barcode.setSupData("12");
// supplement bar height vs bar height ratio
barcode.setSupHeight(0.8f);
// space between barcode and supplement barcode (in pixel)
barcode.setSupSpace(15);
*/
// UPC-E Unit of Measure, pixel, cm, or inch
barcode.setUom(IBarcode.UOM_PIXEL);
// UPC-E barcode bar module width (X) in pixel
barcode.setX(3f);
// UPC-E 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:\\upce.gif");
Java Barcode Generation Demo Source Codes: