2023-08-14 23:03:36 +00:00
|
|
|
"""Example for printing barcodes."""
|
2017-07-27 20:45:51 +00:00
|
|
|
from escpos.printer import Usb
|
|
|
|
|
|
|
|
# Adapt to your needs
|
2023-07-12 18:45:41 +00:00
|
|
|
p = Usb(0x0416, 0x5011, profile="TM-T88II")
|
2017-07-27 20:45:51 +00:00
|
|
|
|
|
|
|
# Print software and then hardware barcode with the same content
|
2023-07-12 18:45:41 +00:00
|
|
|
p.barcode("123456", "CODE39", width=2, force_software=True)
|
2021-10-30 16:15:22 +00:00
|
|
|
p.text("\n")
|
|
|
|
p.text("\n")
|
|
|
|
p.barcode("123456", "CODE39")
|