You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by pa...@mangoosta.net on 2002/06/17 23:03:19 UTC

re: barcodes

Hi,

I am using IdAutomation API (There also exists JBarCodeBean) in order to
produce (code128) barcode images (either as GIF or JPEG format). The API
is very easy to use. I use an fo:external-graphic tag to integrate them.
On the other hand, the barcode reader I use has some difficulty to read
them. It reads them ok but it seems that the generated images are of
average quality and it takes the barcode reader a long time to read them.
Another issue is that it is not easy to produce a image fitting a given
size. You will have to play with multiples of the printer resolution. In
fact, I generate big images in order to keep the quality acceptable.
Apparently, the use of fonts makes better quality barcodes (They used that
with the application that we are trying to replace).
I have not investigated fonts as I was too short on time and the image
based solution seems to be accepted (at least as of now, but that may
change).
I have been told that a specific algorithm is needed in order to encode
the barcode value into a string of characters (that will be used for input
to the font and FOP). Another reason for which I did not use this type of
solution is that this algorithm is contained within a DLL and we do not
want to go playing with DLLs (We are using a Java Application Server and
it is not recommended to use DLLs in an AppServer).
If you try fonts, let me know. I may also have a go on them if I have the
time for it and/or if the guys here tell me that the barcode quality is
judged unacceptable (too slow to read).
Hope I gave few some good feedback.

Pascal



Re: barcodes

Posted by pa...@mangoosta.net.
> According to pascal.munerot@mangoosta.net on Mon, Jun 17, 2002 at
> 11:03:19PM +0200:
>> Hi,
>>
>> I am using IdAutomation API (There also exists JBarCodeBean) in order
>> to produce (code128) barcode images (either as GIF or JPEG format).
>> The API
> ....
>
> I propose you use something like the perl module Code128.pm for
> the algorithm and then from the generated numbers it is real easy
> to generate svg or fo for the bar code itself.
>
> If you need help you may let me know off list.
>
> --
> Eric Smith

Hi,

In fact, I have just found a font and the corresponding algorithm coded in
Java on http://www.bizfonts.com. So i am now trying to incorporate the
demo font they provide into FOP but I get the following exception trace
when I use fop's TTFReader class in order to generate the font metrics
file:
C:\software\fop>c:\software\jdk131\bin\java -cp
.\build\fop.jar;.\lib\batik.jar;.\lib\xalan-2.0.0.jar;.\lib\xerces-1.2.3.jar;.\lib\avalon-framework-4.0.jar;lib\logkit-1.0.jar;.\lib\jimi-1.0.jar org.apache.fop.fonts.apps.TTFReader -enc
ansiC:\WINNT\fonts\SadC128b.ttf barcodettfcm.xml
TTF Reader v1.1.1

Reading C:\WINNT\fonts\SadC128b.ttf...

Number of glyphs in font: 134
Unicode cmap table not present
java.util.NoSuchElementException: Vector Enumeration
        at java.util.Vector$1.nextElement(Vector.java:288)
        at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:398)
        at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:387)
        at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:181)
        at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:143)

which has me thinking that the font does not support unicode ? It is
trying to create a character map for unicode I believe !
Anyone has an idea ?

Pascal.




Re: barcodes

Posted by Eric Smith <Er...@fruitcom.com>.
According to pascal.munerot@mangoosta.net on Mon, Jun 17, 2002 at 11:03:19PM +0200:
> Hi,
> 
> I am using IdAutomation API (There also exists JBarCodeBean) in order to
> produce (code128) barcode images (either as GIF or JPEG format). The API
....

I propose you use something like the perl module Code128.pm for
the algorithm and then from the generated numbers it is real easy
to generate svg or fo for the bar code itself.

If you need help you may let me know off list.

-- 
Eric Smith