By Tim Dexter-Oracle on May 08, 2007
I covered what I thought were the tougher 2D barcodes a while back , we documented the simpler codes (and the 2D's for that matter ... same principle) but I think because we decided to break the doc into two sections, one for the template designer and another for the developer I think we confused things a little and caused a disconnect for most folks. So to make ammends until we revamp the docs. Today, I'll cover the simple stuff ...
If you are using something like a code 39 barcode it may not require any pre-processing on the data to be 'coded'. This is the simplest form of barcoding. Firstly you need to build and test on your desktop. Here are the steps:
- Install the barcode font in your WINDOWS_HOME/fonts directory
- In MSWord highlight the field/data you want to have the barcode applied to
- To test the output you need to let the publisher engine know where the font is on the desktop. Under the cleint install directory you'll find a config directory and under there an 'xdo example.cfg' file. Open it up and you'll see a sample entry for a font:
<font family="GnuMICR" style="normal" weight="normal">
<truetype path="C:\WINNT\fonts\GnuMICR.ttf" />
Just change the entry to point to your font and for the family attribute pput in the name you see in Word when selecting the font.
- Rename the file to xdo.cfg
- Test your template, you should see the barcode font being used to replace the data in the output
Now you need to deploy to the server. The template is simple enough, but we need the server publisher engine to know the location of the font. For both EBS and standalone there is an interface to load the font to the server, the steps are now pretty straightforward. In EBS just use the Font Manager, I covered how to load fonts in this article. For standalone:
- On the operating system copy the font to the JDK/fonts directory
- Login as an administrator and go to Admin tab > Font Settings
- Now fill the details out about your font and select the font file from the drop list.
- The font is now available to all templates in the system.