1
0
Fork 0

Update label size

master
informatic 2016-12-16 01:13:25 +01:00
parent 354d71c211
commit d37cfbb222
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ app = App(__name__)
class Renderer(object):
INCH_PER_MM = 0.039
DPI = 300
def __init__(self, size=(19,51)):
def __init__(self, size=(36,89)):
width, height = [int(s * self.INCH_PER_MM * self.DPI) for s in size]
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
context = cairo.Context(surface)
@ -86,6 +86,8 @@ def healthcheck():
for line in output.split('\n'):
line = line.strip()
if line.startswith('printer DYMO_LabelWriter_450'):
if 'is idle.' in line:
return True, 'Idle'
mark = True
continue
if mark: