python-escpos/examples/software_barcode.py

10 lines
255 B
Python
Raw Normal View History

from escpos.printer import Usb
2017-05-22 18:25:51 +00:00
# Adapt to your needs
p = Usb(0x0416, 0x5011, profile="POS-5890")
# Some software barcodes
p.barcode("Hello", "code128", width=2, force_software="bitImageRaster")
p.barcode("1234", "code39", width=2, force_software=True)