« New Template Builder Main | Barcoding 102 »

Barcoding 101

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 ...


Simple Barcodes


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:




  1. Install the barcode font in your WINDOWS_HOME/fonts directory
  2. In MSWord highlight the field/data you want to have the barcode applied to
  3. 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" />
    </font>

  4. 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.
  5. Rename the file to xdo.cfg
  6. 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:




  1. On the operating system copy the font to the JDK/fonts directory
  2. Login as an administrator and go to Admin tab > Font Settings
  3. Now fill the details out about your font and select the font file from the drop list.
    Font:
  4. The font is now available to all templates in the system.
 Thats it for simple barcodes ... I'll cover how to pre-process data before applying the bar code next.

Comments (1)

Rakesh Sreenivasa:

Hi Tim,

AS suggested , i have made the settings for GnuMICR font and i am able to see the font in Preview of XML Publisher Admin responsibility. But when i run the Format Program through Payables and check for the O/P, I do not get the GnuMICR font .

Plesae let me know, how to achieve this.

Thanks
Rakesh

Post a comment