Main Menu

Barcode generation for J2me

Started by Melssj5, November 11, 2008, 09:33:23 PM

Previous topic - Next topic

Melssj5

Hi, This is a not jpct related question, but feeback says: ANYTHING THAT WONT FIT IN THE OTHER FORUMS.   :o


Does anybody know an API to generate barcode images from a given 13 digits number in j2me.

I have been reading with no luck.
Nada por ahora

influt

Hello, i've had a similar task once. And my solution was not to search for apis, but to code it myself  ;D It's not so hard, you just have to read UPC or EAN documentation, all algorhythms are described there.

Melssj5

I was reading but had no luck finding a good doc.  Now I downloaded a code 39 font and I am trying to get the images for each char and pass it to paint, but I am afraid it wont result. :S

Any recomended tutorial for it?
Nada por ahora

influt

A font is a solution, i used it in j2se with success, but I haven't tried it in mobile java. And yes, i think it would be too expensive for a mobile device to store images for each char. I have a good document that describes EAN construction algorhythm at work. Besides, barcode construction algorhythms are quite similar for some groups of barcodes, so i can send this doc to you tommorow, if you need it.

Melssj5

Can I pass to your office so you can lend me the document? Or can you please post it!  :o
Nada por ahora

Hrolf


influt


Melssj5

Hi, I checked JBars but it uses a servlet to generate the label and then just send it. Is not what I needed. I already checked the mail, and thanks a lot for that piece of code, I will use it later becausse the project is delayed by the customer so the emergency passed.
Nada por ahora

Hrolf

Quote from: Melssj5 on November 14, 2008, 03:25:09 PM
I checked JBars but it uses a servlet to generate the label and then just send it.

Not so! You can download and examine the sourcecode which gives you;

public static synchronized Image createImage (String codeType, String codeValue)

With loads of variations (colours, rotations &c)