epson-tm-t20iii #1

Merged
n07070 merged 34 commits from epson-tm-t20iii into master 2022-05-04 11:57:09 +02:00
Showing only changes of commit 4fea7c1e86 - Show all commits

View File

@ -120,13 +120,17 @@ class Printer(object):
return False
if not os.getenv('LIPY_DEBUG') == True:
self.printer.open(self.usb_args);
self.printer.set(align='left', font='a', bold=False, underline=0, width=1, height=1, density=8, invert=False, smooth=True, flip=False, double_width=False, double_height=False, custom_size=False)
self.printer.textln(clean_msg)
self.printer.set(align='left', font='b', bold=False, underline=1, width=1, height=1, density=9, invert=False, smooth=True, flip=False, double_width=False, double_height=False, custom_size=False)
self.printer.textln("> " + clean_signature + " @ " + strftime("%Y-%m-%d %H:%M:%S", gmtime()))
self.printer.cut()
self.printer.close()
try:
self.printer.open(self.usb_args);
self.printer.set(align='left', font='a', bold=False, underline=0, width=1, height=1, density=8, invert=False, smooth=True, flip=False, double_width=False, double_height=False, custom_size=False)
self.printer.textln(clean_msg)
self.printer.set(align='left', font='b', bold=False, underline=1, width=1, height=1, density=9, invert=False, smooth=True, flip=False, double_width=False, double_height=False, custom_size=False)
self.printer.textln("> " + clean_signature + " @ " + strftime("%Y-%m-%d %H:%M:%S", gmtime()))
self.printer.cut()
self.printer.close
except Exception as e:
flash("Unable to print because : " + e)
flash("Message printed : " + clean_msg ,category='info')
return True