Java Barcode Font Encoder Class Library
The Java Barcode Font Encoder Class Library is used to format linear barcode fonts before printing. This product is royalty-free with the purchase of a Developer License to one of IDAutomation's Barcode Fonts. The library also includes source code (for some methods) that may be used to generate barcodes with barcode fonts from a java application with a minimum of JDK 1.4.
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 Purchase of Developer's License or above of any Barcode Font Package. After purchase, just replace the demo class with the licensed version.
When IDAutomation's self-checking barcode fonts are used, this library or implementation of the source code is not usually necessary. However, it is not necessary to use a font encoder when using the Java Barcode Package, which generates images without fonts.
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:
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:
- 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.
- Add the LinearFontEncoder.class file to the com\idautomation directory.
- 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 or encode ASCII characters directly.
- 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)); } }