Closed ramazankoc88 closed 1 year ago
Changed the code like this and it is working now
from io import BytesIO import base64 from barcode import Code128 from barcode.writer import SVGWriter
options = { "module_width": 0.5, "module_height": 10, "write_text": False }
with open("somefile.svg", "wb") as f: Code128('TEMTEM9999', writer=SVGWriter()).write(f, options)
Hello Here is a simple code that I use to generate Code128 but module width option does not change the width of the output SVG What could be wrong? Thank you
from barcode import Code128 from barcode.writer import SVGWriter
Code128.default_writer_options['write_text'] = True Code128.default_writer_options['module_height'] = 10 Code128.default_writer_options['module_width'] = 0.5
with open("somefile.svg", "wb") as f: Code128('TEMTEM9999', writer=SVGWriter()).write(f)