.NET Barcode for WinForms          ASP.NET Barcode          .NET Barcode Reader          Java Barcode          Java Barcode Reader
Home > Java Barcode > Java ITF-14 Generator

Java ITF-14 Generator

Java ITF-14 Generation package to generate ITF-14 linear barcodes in Java applications.

  • Mature Java ITF-14 package consists of class library contains all necessary class files for java ITF-14barcode generation.

  • Easy integration into your Java IDEs.

  • Royalty free with the purchase of a license by Avapose.

  • Java ITF-14can be easily generated on any operating system with a JVM.

  • Generate ITF-14barcodes in Jasper Reports, iReport & Eclipse BIRT

  • Servlet configured by Apache Tomcat, are compatible with all browsers and easy to embed in HTML as an image with the <IMG> tag.

Java ITF-14 Generator - Overview

Java ITF-14generator is a mature and reliable Java barcode generation component for creating ITF-14barcodes in Java, Jasper Reports, iReport, and Eclipse BIRT projects. High-quality ITF-14barcode images can be drawn and printed into GIF, BMP, PNG, JPEG/JPG & TIFF formats with Java ITF-14barcode generator. Rich barcode options are provided to customize ITF-14barcode properties in accordance with your needs.

ITF-14 information:

ITF-14: also called Case Code or GTIN-14, can only encode numeric digits (0 through 9) with 13-digit data length. It is widely used to mark cartons & cases for UPC or EAN products.

Available encoding data:

numberic digits: 0-9

13 digits length only

The structure of a ITF-14:

1. The first digit is the "Logistic Variant", also named as "Packaging indicator".
2. The product number(the next 12 digits ).
3. The check digit.


Java ITF-14 Installation & Implementation to generate

1. Generate ITF-14 in Java class with the changing of barcode properties.

// Create Java ITF-14 object
ITF14 barcode = new ITF14();

// Set ITF-14 data text to encode
barcode.setData("0123456789123");

// Generate ITF-14 barcode & print into Graphics2D object
//barcode.drawBarcode("Java Graphics2D object");

// Generate ITF-14 barcode & encode into GIF format
barcode.drawBarcode("C://barcode-itf14.gif");

// Generate ITF-14 barcode & encode into JPEG format
barcode.drawBarcode("C://barcode-itf14.jpg");

2. Generate & encode ITF-14 to EPS with changing the values concerned.

// Create Java ITF-14 object
ITF14 barcode = new ITF14();

// Set ITF-14 data text to encode
barcode.setData("0123456789");

// Generate ITF-14 barcode & encode into EPS
barcode.drawBarcode2EPS("C://barcode-itf14.eps");

3. Generate & encode ITF-14 in html or jsp pages.

1. Copy barcode folder and its contents from demo package to Apache Tomcat.

2. Start Apache Tomcat, go to http://YourDomain:Port/barcode/barcode?DATA=0123456789123&TYPE=ITF14

3. Insert an image tag (img) into your page. For example,

<imgsrc="http://YourDomain:Port/barcode/barcode?DATA=0123456789123&TYPE=ITF14" />


4. Two ways to set the width and height of generated barcode ITF-14image.

1. Set the values of the barcodeWidth and barcodeHeight properties.
or
2. Set X (bar module width) and Y (bar module height) values

ITF-14 Property Settings in ITF-14 Java Barcode Generator

ITF-14 Basic Settings

Properties Value
Comments
Property URL Options Default
data DATA (Data to encode in the Codabar) ""

ITF-14 value to encode

ITF-14 Character Set:
  • Digits:0, 1, 2, 3, 4, 5, 6, 7, 8, 9;

addCheckSum ADD-CHECK-SUM (Data to encode in the Codabar) false

addCheckSum property is not applied here. Java Barcode will always add a check character in the last digit.

ITF-14 Special Settings

Properties Value
Comments
Property URL Options Default
N
N
float
2.of Wide/narrow ratio, 2.0 - 3.0 inclusive, default is 2.
bearerBarHori
BEARER-BAR-HORI
float
1 The value of the horizontal bearer bars (top and bottom bars). Valid values are 0-10 which are a multiple of X.
baererBarVert
BEARER-BAR-VERT
float
1 The value of the vertical bearer bars (left & right bars). Valid values are 0-10 which are a multiple of X..

ITF-14 Text Settings

Properties Value
Comments
Property URL Options Default
showText

SHOW-TEXT
true or false
true


Show text underneath the barcode

textColor

TEXT-COLOR
Color
black

Color of the shown text

textFont
TEXT-FONT
Font
new Font("Arial",Font.PLAIN,11)

The font, font style and font size of the text

textMargin
TEXT-MARGIN
float
6

The space between the text and the barcode symbol

ITF-14 Size Settings

Properties Value
Comments
Property URL Options Default
rotate

ROTATE
Degree0, 90, 180, 270
0 (Barcode.ROTATE)

Rotate the Angle of the Codabar images

autoResize

AUTO-RESIZE
true or false
false

Auto resize the generated barcode image

barcodeHeight
BARCODE-HEIGHT
float
0

Barcode image Height

barcodeWidth
BARCODE-WIDTH
float
0

Barcode image Width

bottomMargin
BOTTOM-MARGIN
float
0

Barcode image bottom margin size
leftMargin LEFT-MARGINE float 0


Barcode image left margin size

rightMargin RIGHT-MARGIN float 0

Barcode image right margin size.

topMargin TOP-MARGIN float 0


Barcode image Top margin size
barAlignment BARALIGMENT int 1(center)


Barcode horizontal alignment inside the image. 0: left, 1: center, 2: right.
uom
UOM
Pixel, Cm, or Inch
0(Pixel)

Unit of Measure for all numeric properties.Valid values: 0: pixel; 1: inch; 2: cm.
X X float 1

Width of barcode bar module (narrow bar), default is 1 pixel

Y Y float 30

Height of barcode bar module, default is 30 pixel

ITF-14 Color Settings

Properties Value
Comments
Property URL Options Default
backColor
BACK
-COLOR
Color
white

Barcode image background color

foreColor
FORE
-COLOR
Color
black
Barcode image foreground color

ITF-14 Image Settings

Properties Value
Comments
Property URL Options Default
resolution
RESOLUTION
int
72

Resolution of Codabar Image, Dots Per Inch

Method

// generate barcode and output to OutputStream object
public boolean drawBarcode(OutputStream outputStream) throws Exception

// generate barcode into a new BufferedImage object
public BufferedImage drawBarcode() throws Exception

/*
Use this method to generate barcode, and save into gif or jpeg files
1. to save into gif file, filename ends with ".gif", like "c:\\barcode.gif"
2. to save into jpeg file, filename ends with ".jpg", like "c:\\barcode.jpg"
*/

public byte[] drawBarcodeToBytes() throws Exception

public boolean drawBarcode(String imageFile) throws Exception

// Generate barcode and save into EPS file, the filename must ends with ".eps"
public void drawBarcode2EPS(String filename) throws Exception

// Generate barcode on Graphics2D object within certain area
public void drawBarcode(Graphics2D g, Rectangle2D rectangle) throws Exception