| Home >
Products >
Oracle Reports Barcode Implementation with Java & RTF Templates: |
Creating Barcodes in XML Publisher
The implementation tutorial presented here creates barcodes in Oracle
XML Publisher with RTF templates using the
PDF417 Font and
Encoder or the
Data Matrix
ECC200 Font and Encoder. This example is a summary taken from a
barcoding
blog written by Tim Dexter at the Oracle Website. For assistance
with this tutorial, please refer to the
blog and
the example provided for it.
- When creating linear barcodes such as Code 128, please refer
to the
Oracle
XML Publisher Blog for Linear and Code 128 Barcodes.
- To obtain the barcode fonts and their encoding classes; purchase
either the PDF417
Font and Encoder or the
Data Matrix
ECC200 Font and Encoder.
- Integrate the appropriate class into the CLASSPATH for the
PDF417 Java Class Font Encoder or the
Data Matrix Java Class Font Encoder.
- Install the appropriate font from the AdditionalFonts.zip file
or run the installation executable to install the font in Windows.
- Update the XMLP encoding class. For example, when implementing
PDF417, import the font encoder class and add an entry for the pdf417
font:
import IDautomationPDFE.PDF417Encoder;
...
ENCODERS.put("pdf417",mUtility.getClass().getMethod("pdf417", clazz));
and create a pdf417 method that just calls the class provided by
the font vendor:
public static final String pdf417( String DataToEncode )
{
PDF417Encoder pdfe = new PDF417Encoder();
return ( pdfe.fontEncode(DataToEncode) );
}
Compile and deploy to the server as normal.
- Use the font in a template. Open Microsoft Word. Create the
template and for the data that is to be encoded in the barcode:
(a) Use a formfield or raw text
<?format-barcode:ITEM_DESCRIPTION ;'PDF417';'XMLPBarVendor'?>
where ITEM_DESCRIPTION is the data to be encoded
PDF417 is the name of the encoding method to be used
XMLPBarVendor is the name of our encoder
(b) Mark the formfield or text with the PDF417 font
Save the template and deploy.
Related
Documents and Keywords:
View the
product index to obtain a list of all IDAutomation's
products.
|