Update label size
parent
354d71c211
commit
d37cfbb222
|
@ -23,7 +23,7 @@ app = App(__name__)
|
||||||
class Renderer(object):
|
class Renderer(object):
|
||||||
INCH_PER_MM = 0.039
|
INCH_PER_MM = 0.039
|
||||||
DPI = 300
|
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]
|
width, height = [int(s * self.INCH_PER_MM * self.DPI) for s in size]
|
||||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
|
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
|
||||||
context = cairo.Context(surface)
|
context = cairo.Context(surface)
|
||||||
|
@ -86,6 +86,8 @@ def healthcheck():
|
||||||
for line in output.split('\n'):
|
for line in output.split('\n'):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if line.startswith('printer DYMO_LabelWriter_450'):
|
if line.startswith('printer DYMO_LabelWriter_450'):
|
||||||
|
if 'is idle.' in line:
|
||||||
|
return True, 'Idle'
|
||||||
mark = True
|
mark = True
|
||||||
continue
|
continue
|
||||||
if mark:
|
if mark:
|
||||||
|
|
Loading…
Reference in New Issue