1

I want to generate a EAN13 barcode using java but I cannot find a library that generates this number. I found the library barcode4j, a text library but it only generates the image. My problem now is that to make the number itself valid. (I can check it later online to see if its checksum is correct).

1
  • Can you please take the time to spell check your question? Dec 18, 2018 at 7:54

1 Answer 1

5

Don't generate the whole thing. Generate the first numbers, and calculate the checksum.

For example, if you were creating this existing EAN: 7025446116002, you'd only generate 702544611600, and then generate the last digit yourself.

Now the question is how do you generate that number? The answer can be found here

You said you already had the barcode generator bit working, so this should be fine.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.