diff --git a/smallprint.py b/smallprint.py index 52a68fd..d30dbfe 100644 --- a/smallprint.py +++ b/smallprint.py @@ -41,7 +41,7 @@ def initialize(): printer_endpoint = config.get("PRINTER_ENDPOINT") or 0x01 # return Usb(prid1, prid2, printer_interface, printer_endpoint) - return File("/dev/usb/lp0") + return File("/dev/usb/lp2") def reset_defaults(printer): @@ -199,7 +199,7 @@ def print_image(printer, image): im = im.transpose(Image.ROTATE_90) else: - height = math.floor(384.0 * ratio) + height = math.floor(384.0 / ratio) im = im.resize((384, height)) im.save("temp.png")