Barcodes and Bugs

Posted by Tim Dexter on Oracle Blogs See other posts from Oracle Blogs or by Tim Dexter
Published on Thu, 20 Sep 2012 14:00:00 +0000 Indexed on 2012/09/20 15:45 UTC
Read the original article Hit count: 318

A great mail from Mike at Browning last week. He has been through the ringer getting his BIP barcoding sorted out but he's now out of the woods. Here's the final result.

By way of explanation, an excerpt from Mike's email:  

This is an example of the GS1_128 carton shipping labels we are now producing with BIP in our web application for our vendors who drop ship products to our dealers.
It produces 4 labels per printed page, in PDF format, on peel & stick label paper. Each label has a unique carton number, and a unique carton serial number in the SSCC-18 barcode.
This example is for Cabelas (each customer has slightly different GS1-128 label format requirements – custom template for each - a pain!).
I am using custom java encoders I wrote for the UPC and SSCC-18 barcodes, and a standard encoder (code128b) for the ShipTo zip barcode.

 Is there any way yet to get around that SUPER ANNOYING bug when opening the rtf template in MS Word, and it replaces my xsl code text in the barcode fields with gibberish???
Every time I open it I have to re-enter all the xsl code. Not only to be able to read & edit it, but also to get it to work in BIP (BIP doesn’t like the gibberish if I upload the template that has it).

Mike's last point, regarding the annoying bug in the template builder, is one that I have experienced occasionally. The development team have looked at it and found it to be an issue with MSWord and not a plugin problem. That's all well and good but how can you get around it?

Well, you can take advantage of the font mapping that BIP offers to get the barcodes into the PDF output. As many of you know, getting a barcode font to appear in the PDF output, you need employ the use of the xdo.cfg file in the template builder config directory.
You would normally have an entry such as this:

 

      <font family="Code 128" style="normal" weight="normal">
       <truetype path="C:\windows\fonts\128R00.TTF" /> 
      </font>

to map a barcode font to get it to render in the PDF output when testing from the template builder plugin.

 

Mike's issue is only present when the formfield is highlighted with a barcode font. The other fields in the template are OK.
What you can do to get around the issue is to bend the config entry to get around having to use the barcode font in the template at all. Changing the entry to something like:

 

      <font family="Calibri" style="normal" weight="normal">
       <truetype path="C:\windows\fonts\128R00.TTF" /> 
      </font>

 

Note that we are mapping the Calibri; a humanly readable and non 'erroring' font in the template, to the code 128 barcode font. Where you used to highlight the field with the barcode in MSWord, you now use the Calibri font instead. At run time, BIP will go look for the Calibri font mapping and will drop in the Code128 font. Of course, Calibri is an example; you need to pick a font that you are not going to use any where else in the layout.



© Oracle Blogs or respective owner

Related posts about /Oracle/Templates/RTF/Barcoding