-
Notifications
You must be signed in to change notification settings - Fork 49
Printer
Samuel Dudley edited this page Dec 9, 2015
·
2 revisions
printer = Printer('/dev/null') # will use the orthosie driver
# will use the orthosie driver, interface is ignored
printer = Printer({'spool': '/dev/null', 'driver': 'orthosie', 'interface': ''})
# will use the python-escpos driver
printer = Printer({'spool': '192.168.192.168', 'driver': 'escpos', 'interface': 'network'})
kwargs = {'font': 'A', 'align': 'CENTER'}
printer.set(**kwargs) # set the printer formatting
printer.print_line('Hello World!') # print text
kwargs = {'mode': 'PART'}
printer.cut(**kwargs) # this is a part cut
kwargs = {'pin': 2}
printer.kick_drawer(**kwargs) # draw kick using pin 2
printer.cut() # this is a full cut