python-escpos/examples/barcodes.py

12 lines
256 B
Python
Raw Permalink Normal View History

from escpos.printer import Usb
# Adapt to your needs
p = Usb(0x0416, 0x5011, profile="POS-5890")
# Print software and then hardware barcode with the same content
2021-10-30 16:15:22 +00:00
p.soft_barcode("code39", "123456")
p.text("\n")
p.text("\n")
p.barcode("123456", "CODE39")