Added test script for hard and soft barcodes (#243)

This commit is contained in:
Romain Porte 2017-07-27 22:45:51 +02:00 committed by Patrick Kanzler
parent cf0cf127fe
commit c7080165a7
1 changed files with 11 additions and 0 deletions

11
examples/barcodes.py Normal file
View File

@ -0,0 +1,11 @@
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
p.soft_barcode('code39', '123456')
p.text('\n')
p.text('\n')
p.barcode('123456', 'CODE39')