From c7080165a7420b5cfe8cf17c5717ee7da2b7b60f Mon Sep 17 00:00:00 2001 From: Romain Porte Date: Thu, 27 Jul 2017 22:45:51 +0200 Subject: [PATCH] Added test script for hard and soft barcodes (#243) --- examples/barcodes.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/barcodes.py diff --git a/examples/barcodes.py b/examples/barcodes.py new file mode 100644 index 0000000..7e9c242 --- /dev/null +++ b/examples/barcodes.py @@ -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')