Remove text below barcode in python barcode.py library

Question:

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-barcode but could not find solution,what properties should be written in barcode saving line in python:

ean = barcode.get('code39', str(row['PART']), writer=ImageWriter())

Attaching barcode picture with marked line what i would like to remove from barcode generation.
enter image description here

Asked By: orangutangas

||

Answers:

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.

Answered By: Mark Ransom

Try this:

barcode.default_writer_options['write_text'] = False
Answered By: user8877909

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})
Answered By: Fran

If you import "barcode", the solution is:

import barcode
barcode.base.Barcode.default_writer_options['write_text'] = False
Answered By: Kevin
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.