From 65235d8c9afb983b3a8564560229f50051328a94 Mon Sep 17 00:00:00 2001 From: Aron Date: Thu, 20 Nov 2025 12:32:34 +0100 Subject: [PATCH] formatting --- app/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index a3391f9..11f566e 100644 --- a/app/main.py +++ b/app/main.py @@ -243,8 +243,12 @@ def print_task(request: Request, task_id: str): print(f"[DEBUG] Attempting to print to {PRINTER_DEVICE} at {PRINTER_BAUDRATE} baud...") try: printer = escpos.printer.Serial(devfile=PRINTER_DEVICE, baudrate=PRINTER_BAUDRATE, timeout=1) - printer.text(f"Task: {task.content}\nVon: {task.user}\nPriorität: {task.priority}\n") + + # Print the formatted image instead of plain text + printer.image(img) + printer.text("\n\n") # Add some spacing after image printer.cut() + print(f"[DEBUG] Print command sent successfully") except Exception as print_err: print(f"[ERROR] Printer failed: {print_err}")