Does anyone know how to remove text below a bar-code? Bar-code is generated using barcode.py
library. I was trying to check in https://bitbucket.org/whitie/python-b
If you import "barcode", the solution is:
import barcode
barcode.base.Barcode.default_writer_options['write_text'] = False
try this: barcode.default_writer_options['write_text'] = False
Looking at the code, it appears you can set the attribute 'human'
(human-readable text) to a non-empty string to override the text at the bottom. If this is set to a string with a single blank, ' '
, the text will be empty.
This is the solution
import barcode
from barcode.writer import ImageWriter
ITF = barcode.get_barcode_class('itf')
itf = ITF('30573190692203003169482900832115201911297', writer=ImageWriter())
fullname = itf.save('itf_barcode', options={"write_text": False})