Author Topic: Barcode generation for J2me  (Read 9814 times)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Barcode generation for J2me
« on: November 11, 2008, 09:33:23 pm »
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

Offline influt

  • byte
  • *
  • Posts: 25
    • View Profile
Re: Barcode generation for J2me
« Reply #1 on: November 11, 2008, 11:12:09 pm »
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.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Barcode generation for J2me
« Reply #2 on: November 11, 2008, 11:14:10 pm »
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

Offline influt

  • byte
  • *
  • Posts: 25
    • View Profile
Re: Barcode generation for J2me
« Reply #3 on: November 11, 2008, 11:20:53 pm »
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.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Barcode generation for J2me
« Reply #4 on: November 12, 2008, 08:26:15 pm »
Can I pass to your office so you can lend me the document? Or can you please post it!  :o
Nada por ahora

Offline Hrolf

  • int
  • **
  • Posts: 84
    • View Profile
Re: Barcode generation for J2me
« Reply #5 on: November 13, 2008, 03:39:23 am »
I haven't tried it but might this do it?

Offline influt

  • byte
  • *
  • Posts: 25
    • View Profile
Re: Barcode generation for J2me
« Reply #6 on: November 14, 2008, 10:54:15 am »
check your mail, Melssj5

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Barcode generation for J2me
« Reply #7 on: November 14, 2008, 03:25:09 pm »
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

Offline Hrolf

  • int
  • **
  • Posts: 84
    • View Profile
Re: Barcode generation for J2me
« Reply #8 on: November 14, 2008, 10:42:06 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;

Code: [Select]
public static synchronized Image createImage (String codeType, String codeValue)
With loads of variations (colours, rotations &c)