Wrong barcode format from "python-barcode" library

Viewed 339

I am trying to print ean-13 format from python-barcode library but I keep getting incorrect format of the barcode. I wrote the following code

import barcode
from barcode.writer import ImageWriter
EAN = barcode.get_barcode_class('ean13')
ean = EAN(u'8906127480058', writer=ImageWriter())
fullname = ean.save('my_ean13_barcode')

The output was

enter image description here

Expected output is

enter image description here

1 Answers

The thirteenth number is a checksum. The software that generates the graphic may be confused by your addition of the 8. Try sending the 12 character string '890612748005' instead.

Related