Created
January 27, 2019 18:02
-
-
Save muimota/5eec694804a6d256f3e879226a0d4cd3 to your computer and use it in GitHub Desktop.
Print example os escpos printer Citizen S300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#uses python-escpos | |
#https://github.com/python-escpos/python-escpos | |
#2019 muimota | |
from escpos.printer import File | |
import os | |
p = File("/dev/usb/lp0") | |
p.text("Hello World\n") | |
if os.path.isfile('logo.gif'): | |
p.image("logo.gif") | |
else: | |
p.text('logo.gif not found!') | |
p.barcode('1324354657687', 'EAN13', 64, 2, '', '') | |
p.qr("http://martinnadal.eu") | |
p.cut() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment