Java Barcode Font Encoder Class Library

The Java Barcode Font Encoder Class Library is used to format barcode fonts before printing. This product is royalty-free with the purchase of a Developer License to one of IDAutomation's Barcode Fonts. For customers implementing barcode generation in Oracle E-Business Suite (EBS) or XML Publisher, refer to the Oracle BIP Tutorial.

Download Demo   BIP Tutorial

The demo class includes a popup screen and is to be used just for testing purposes. Use of this Java Class Library requires a Developer License or above. This font encoder is supplied with the purchase of a Developer's License or above of any Barcode Font Package. After purchase, just replace the demo class with the licensed version.

Implementation Tutorial

The library and source code are royalty-free, provided it is only used with one of IDAutomation's licensed barcode fonts. It supports the following barcode fonts with the methods listed:

Java Methods for Standard Barcode Fonts
Barcode Type Method(s) & Notes Font to use
Code-128 Code128(DataToEncode, ApplyTilde)
Code128 is the recommended method to use.

Code128a(DataToEncode)
Code128b(DataToEncode)
Code128c(DataToEncode)
IDAutomationC128
Code-39 Code39(DataToEncode)
Code39Mod43(DataToEncode)
IDAutomationC39
Code-93 Code93(DataToEncode) IDAutomationC93
EAN-13 EAN13(DataToEncode) IDAutomationUPCEAN
EAN-8 EAN8(DataToEncode) IDAutomationUPCEAN
Interleaved 2 of 5 I2of5(DataToEncode)
I2of5Mod10(DataToEncode)
IDAutomationI25
UPC-A UPCa(DataToEncode) IDAutomationUPCEAN
UPC-E UPCe(DataToEncode) IDAutomationUPCEAN
USPS IntelligentMail IMb

IntelligentMail( )
This method is provided in the IntelligentMail.class file. The source code for this method is only supplied with the purchase of the Unlimited Developer License.

IDAutomationPOSTNET
or IDAutomationIMB
or IDAutomation_Uni
Java Methods for the Universal Barcode Font
The methods listed below are preceded with IDAutomation_Universal_ and are only to be used with the IDAutomation Universal Barcode Font Advantage™. 
Barcode Type Method(s) & Notes Font to use
Code-128 C128(DataToEncode, ApplyTilde)
NOTE: Code128( ) is the recommended method to use. Code128( ) is also used to create GS1-128.
C128A(DataToEncode)
C128B(DataToEncode)
C128C(DataToEncode)
IDAutomation_Uni
not applicable C128HR(DataToEncode, ApplyTilde)
This method returns text for Code 128 barcodes, such as for GS1-128.
Text Font
Code-39 C39(DataToEncode, N_Dimension, IncludeCheckDigit) IDAutomation_Uni
Codabar Codabar(DataToEncode, N_Dimension, StartChar, StopChar) IDAutomation_Uni
Interleaved 2 of 5 I2of5(DataToEncode, N_Dimension, IncludeCheckDigit) IDAutomation_Uni
MSI / Plessey MSI(DataToEncode, N_Dimension, IncludeCheckDigit) IDAutomation_Uni
USPS IntelligentMail IntelligentMail()
This method is also provided in the IntelligentMail.class file. The source code for this method is only supplied with the purchase of the Unlimited Developer License.
IDAutomation_Uni
USPS Postnet Postnet(DataToEncode, IncludeCheckDigit) IDAutomation_Uni
USPS Planet Planet(DataToEncode, IncludeCheckDigit) IDAutomation_Uni
Java Methods for the GS1 DataBar Barcode Font
The methods listed below are preceded with IDAutomation_DataBar_ and are only to be used with the IDAutomation GS1 DataBar Font
Barcode Type Method(s) & Notes Font to use (Begins with IDAutomation)
DataBar DataBar(DataToEncode) DataBar 34
DataBar Expanded DataBarExpanded(DataToEncode, 22) DataBar 34
DataBar Expanded Stacked DataBarExpanded(DataToEncode, Segments) DataBar 34
DataBar Limited DataBarLimited(DataToEncode) DataBar 13
DataBar Stacked DataBarStacked(DataToEncode) DataBar 13
DataBar Stacked Omnidirectional DataBarStackedOmniDirectional(DataToEncode) DataBar 34
DataBar Truncated DataBar(DataToEncode) DataBar 13

Additional methods for 2D symbologies are supported by libraries provided in their respective packages listed below. Within each of these packages, refer to the included example and JavaDoc folder within the Developer Tools zip file.

To use the methods exposed in the class library, perform the following:

  1. Create a directory named com\idautomation from the root of the classpath. For example, if the classpath is C:\classpath, the directory would be C:\classpath\com\idautomation .
  2. Add the LinearFontEncoder.class file to the com\idautomation directory.
  3. Use methods of the class to format data to the appropriate barcode font.

Property Descriptions:

  • ApplyTilde - If the ApplyTilde option is set to True, characters following the tilde may be used to perform additional calculations.
  • DataToEncode - this string value represents the data being encoded.
  • N_Dimension - determines the width of the wide bars, which is a multiple of the X dimension. Valid values are 2, 2.5, and 3. The default is 2. The X dimension is determined by the font point size.
  • IncludeCheckDigit - a Boolean value that determines whether a check digit should be automatically calculated and included for the DataToEncode.

Java Source Code Examples:

import com.idautomation.*; 
public class Code128TestApp 
{ 
 public static void main(String [ ] args) 
 { 
 LinearFontEncoder FontEncoder = new LinearFontEncoder(); 
  String DataToEncode = "123456789012"; 
 System.out.println(FontEncoder.Code128b(DataToEncode));
 }
}
 
import com.idautomation.*;
public class DataBarTestApp
{
 public static void main(String [ ] args)
 {
 DataBar DBFontEncoder = new DataBar();
 String DataToEncode = "20012345678909"; 
 System.out.println(DBFontEncoder.IDAutomation_DataBar_
 DataBarStackedOmniDirectional(DataToEncode));
 } 
}
 
import com.idautomation.universalencoder.*;
public class UniversalTestApp
{
 public static void main(String [ ] args)
 {
 Universal UniFontEncoder = new Universal();
 String DataToEncode = "123456789012";
 boolean ApplyTilde = true;
 System.out.println(UniFontEncoder.IDAutomation_Universal_C128(DataToEncode,ApplyTilde));
 } 
}
 
import com.idautomation.*; 
public class IMBTestApp 
{ 
 public static void main(String [ ] args) 
 { 
 LinearFontEncoder FontEncoder = new LinearFontEncoder(); 
 String DataToEncode = "1234567890123456789012345"; 
 System.out.println(FontEncoder.IntelligentMail(DataToEncode));
 }
}