Using barcodes on PDF forms

March 12, 2007

Nowadays traceability is very important, especially in some specific sectors: food, transport, distribution, etc. Thus the use of barcodes is common. In Openbravo implementations this need has been solved using Barcode4j. Barcode4j implements different barcode types: Code 39, Code 128, EAN-128, Codabar, UPC-A, EAN-13, EAN-8, …
In spite of the fact that it is possible to implement different barcode types, depending on the barcode type the implementation can be more complex.
It is not an object of this post to explain the Barcode4j functionality (examples), but I will show an EAN-128 example using XmlEngine on OpenbravoERP.

XML FILE:
<FIELD id=”fieldUpc” replaceCharacters=”fo” attribute=”message” replace=”xxzzz” default=”0038437005258001453″>upc</FIELD>

FO FILE:
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc=”http://barcode4j.krysalis.org/ns” message=”xxzzz” render-mode=”svg” id=”fieldUpc”>
<bc:ean128>
<bc:quiet-zone>1cm</bc:quiet-zone>
<height>32mm</height>
<module-width>0.6mm</module-width>
<bc:human-readable>
<bc:omit-brackets>false</bc:omit-brackets>
</bc:human-readable>
</bc:ean128>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>

P.D: This example is implemented with FOP 0.20.5 and Barcode4j 1.0. As soon as we implement the example with FOP 0.92 and Barcode4j 2.0. we let you know.

Entry Filed under: Openbravo. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2007
M T W T F S S
« Feb   Sep »
 1234
567891011
12131415161718
19202122232425
262728293031  

Most Recent Posts