KA.Barcode for Java
UPC-A Image Setting for Java
Draw and print UPC-A linear barcodes with setting fixed image resolution, format, colors, rotation, etc using Java
UPC-A Barcode Generator for Java Overview
  • The software is fully compatible with Windows 7 32/64, Vista 32/64, XP 32/64, 2003 Server, 2008 Server
  • Provide professional features to set UPC-A image with various choices on image resolution, format, color, angle, etc in Java developmental environment
  • Unit of Measure can change the generated UPC-A image in Inch, CM or Pixel
  • Common-used image formats are valid here, which are png, tiff, gif, jpeg and bmp
  • UPC-A barcode can be set in the center, right or left of the image
  • Show text can enable or disenable with Java UPC-A generator
  • Encode 2 or 5 supplement data to generate a 14 or 17 data length UPC-A image in Java
Related UPC-A Java Generation Setting Guide
KA.Barcode Generator for Java supports full barcode generation functions for UPC-A which are UPC-A size setting guide, UPC-A image setting guide and UPC-A data encoding guide:
  • UPC-A Size Setting for Java focuses on setting UPC-A bar module width, bar module height, image width, image height, left margin, right margin, top margin, bottom margin, uom, etc;
  • UPC-A Data Encoding for Java focuses on setting UPC-A valid data set and valid data length, and especially supplemental data length.
Java UPC-A Image Setting Properties
UPC-A barcode image generated in Java developmental environment can be adjusted from the following properties:
  • supData - the supplement data with 2 or 5 digits for supplement barcode on the right side of UPC-A image
  • displayText - show the UPC-A image text after setting it to be true
  • rotate - UPC-A image rotate angle with 0, 90, 180 and 270 degrees
  • resolution - UPC-A image resolution in dpi (short for dot per inch)
  • backgroundColor - the color of UPC-A barcode image background
  • foregroundColor - the color of UPC-A barcode image foreground
  • textColor -the color of UPC-A text under the barcode
  • ApplyChecksum - to add the check sum digit after the UPC-A encoding data in the text
  • barAlignment - put the barcode in the left, right and center inside the UPC-A image
UPC-A Image Setting in Java - Implementation
All UPC-A image setting concerned features implementation needs installing UPC-A Generator in Java and do as below:
//Build UPC-A barcode object in Java
BarCode barcode = new BarCode();
//Set barcode type to be UPC-A
barcode.setType(IBarCode.UPCA);
//Set UPC-A encoding code value with only 12 data length including the auto check character
barcode.setData("65432165432");

UPC-A Supplement Barcode in Java

UPC-A in Java can encode 14 or 17 data with numeric characters from 0 to 9 after encoding 2 or 5 numeric supplement data using Java applications.
//For 2 supplement data
barcode.setsupData("01");
//For 5 supplement data
barcode.setsupData("54321");

UPC-A Image Resolution Setting in Java

For UPC-A image resolution using Java, it can be set to be any fixed value for the UPC-A image, like the following example:
//Set UPC-A image resolution in dpi, default value is 72
Barcode.setResolution(66);

UPC-A Image Placement Setting using Java

UPC-A image placement in Java can be influenced with two aspects which are rotation and bar alignment for UPC-A image in Java developmental environment like below:
//Set UPC-A rotation angle using Java
barcode.setRotate(IBarCode.ROTATE_180);
//Set UPC-A bar alignment in Java
Barcode.setbarAlignment(right);

UPC-A Image Color Setting with Java

UPC-A image color can be influenced with three properties which are background color, foreground color and text color. Here is an example below:
//Set UPC-A image background color in Java
barcode.setbackgroundColor(blue);
//Set UPC-A image foreground color in Java
barcode.setforegroundColor(black);
//Set UPC-A image text color in Java
barcode.settextColor(black);

Text Setting for Java UPC-A Image

Text setting is valid for all linear barcodes like UPC-A here which includes display text; add check sum digit and the special characters for UPC-A - show start and stop characters like the following example:
// Display human readable text
barcode.setDisplayText(true);
//Add a checksum digit to Code-39 encoding code
barcode.setApplyChecksum(true);
Note that if the displayText is set to be false, all the text related properties such as applyChecksum, textColor are invalid for adjustment. However, displayText is set to be true in default with our product.