Is there any python library to generate ean128 barcode. I tried 'python-barcode' , but in that library there is no option for ean128.
-
why you are giving minus vote. i didnt find any package for that. i – coder Feb 26 '18 at 08:18
-
1I guess, because you didn't read [What topics can I ask about here?](https://stackoverflow.com/help/on-topic), especially #4. Your question is considered off topic. – Mr. T Feb 26 '18 at 09:36
2 Answers
The person who originally asked this question may not benefit from this, but this is for those who are still looking for an answer.
Note: Code-128 is not same as GS1-128
I was also stuck with this issue a few days ago, and I finally managed to find a python library which supports the GS1-128(UCC/EAN-128) barcode.
The library I am referring to is called "treepoem". Strange name I agree that's what makes it so hard to find. It is a wrapper for BWIPP library. And it has a dependency on ghostscript as well. About the name; Barcode -> Bark ode -> Tree poem.
Important links:
1) Ghostscript; download and install it and also add its "bin" and "lib" folder to
system's path variable.
https://www.ghostscript.com/download/gsdnld.html
2)treepoem
https://pypi.org/project/treepoem/
3) All-codes; here in the repository you will find all supported barcodes here.
https://github.com/adamchainz/treepoem/blob/master/treepoem/data.py
import treepoem
image = treepoem.generate_barcode(
barcode_type='gs1-128', # One of the BWIPP supported codes.
data='(01)14-digit-product-code')
image.convert('1').save('barcode.png')

- 209
- 4
- 8
I think that EAN 128
is the same thing as Code 128
(https://en.wikipedia.org/wiki/Code_128). It seems to be supported by python-barcode
There is an alternative lib with code 128

- 41,928
- 25
- 127
- 172
-
thanks for your answer. i tried with python barcode code 128. but the barcode reader cannot read it. – coder Feb 26 '18 at 12:23