From c390b319e4c9d084d65d107fa7ca3617e6d0dad7 Mon Sep 17 00:00:00 2001 From: Romain Porte Date: Thu, 27 Jul 2017 21:53:01 +0200 Subject: [PATCH] Added test script for hard and soft barcodes --- 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..06d5a2e --- /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') \ No newline at end of file