Sunteți pe pagina 1din 3

Bundled Barcodes Batman

By Tim Dexter on Jul 08, 2010

Sorry, ran out of B's for my alliteration. Hope those of you on this side of the pond enjoyed the fourth. We had our town's celebration on Monday. Organized by my wife, who is an Englisher, the irony was lost on most folks. Still the Renaissance Festival's elephants were a hit and they did not eat the park tress. The water slide turned into a mud bath which went down well with hte kids until we hosed them off with snow melt water :) I spent my day making cotton candy (candy floss) for the kids. If I never have to make it again, it will be too soon. It gets everywhere, quite an ingenious machine thou.

As many of you may have noticed, there are 3 barcode fonts bundled with BI Publisher these daze.

Font file Supported algorithms(barcode_type) 128R00.TTF code128a, code128b and code128c B39R00.TTF code39, code39mod43 UPCR00.TTF upca, upce
Thats all well and good but for the likes of the code128 you need to encode your data prior to applying the font. That means some custom java code for you to write and maintain :( Custom code, pah! No longer needed as the boys and gals in dev are now supplying a java encoding library for the delivered fonts. Big kudos and thanks to Tomoji and Kenneth for 1. putting the solution together and 2. writing it up! You need to be on at least 10.1.3.4.1 to get the library. Once you have it, life could not be much simpler to use the barcodes. Usage 1. Insert a field, and setup the code in properties with <?format-barcode:data;'barcode_type'?> command in the RTF template. You don't need to register any java program because it's already integrated, but you need make sure the font file exist in the font directory. Examples:

<?format-barcode:INVOICE_NO;'code128a'?> <?format-barcode:INVOICE_NO;'code39mod43'?> <?format-barcode:INVOICE_NO;'upca'?>


2. Configure the font correctly in the config file or BIP enterprise UI. Hit the books for this step, its all there in grayscale glory.

Once configured or if you want to test the font on the template builder, here's an example cfg file for UPC font:

<config version="1.0.0" <!-- Properties --> <properties> </properties>

xmlns="http://xmlns.oracle.com/oxp/config/">

<!-- Font setting --> <fonts> <font family="Bookman" style="normal" weight="normal"> <truetype path="C:\WINDOWS\Fonts\UPCR00.TTF"/> </font> </fonts> </config>

Note: - Please note that for the Template Builder for Word, Microsoft Word require the fonts exist in the system font directory (e.g. C:\WINDOWS\Fonts) and you need to set up the configuration as above - There is a known bug exist in Microsoft Word, if you save the template after setting a field with a barcode font, the code will become non-readable after you close and re-open. To avoid such case, set a different font (e.g. Bookman) to the form field in MS Word and map it to the actual font file in the configuration.

<font family="Bookman" style="normal" weight="normal"> <truetype path="C:\WINDOWS\Fonts\UPCR00.TTF"/> </font>


This is neat work around for an issue that I hit all too often. - UPC-A - upca accept only UPC-A message string and encode into UPC-A barcode - string of 12 character length will be treated as UPC-A message with a check digit, 11 will be without check digit - UPC-E - upce accept only UPC-E message string and encode into UPC-E barcode - string of 8 character length will be treated as UPC-E message with both front and end guard bar, 6 will be without - we always re-calculate the check digit on both UPC-A and UPC-E output I know, I know, 11g was announced yesterday and Im late to the party. There are some very neat new features coming and I have a favorite that is going to make building data models a breeze ... more soon!
Category: Oracle

Tags: none Permanent link to this entry

BIP 10.1.3.4.x June... | Main | Cant see the Woods...

Comments:

For some reason I cannot get this to work. In my .rtf i have the following: but when I view the PDF the output on the pdf is: abc123456798 How do i know when its encoded it properly? i can apply the font alright but it just seems as if its not being encoded at all?
Posted by Simon D on August 25, 2010 at 04:40 PM MDT #

my code did not paste correctly due to angle brackets so here it is minus the brackets: ?formatbarcode:abc123456789;'code128b';?
Posted by Simon D on August 25, 2010 at 04:42 PM MDT #

Health reform is becoming law.How it's possible for those states to file law suits on Government?Shouldn' they obey the law now or face the jail or something?
Posted by on September 25, 2010 at 02:33 AM MDT #

How about a german alliteration with Bs: "Baertige Biberacher Biertrinker bevorzugen bei besonderen Begebenheiten besonders braufrisches Bier" meaning roughly translated by G**gle: "bearded beer drinkers from Biberach prefer for special occassions particularly freshly brewed beer" ?

S-ar putea să vă placă și