From 72d19bd8b0df1cdff17d305fcf801e9ca8e5bbd8 Mon Sep 17 00:00:00 2001 From: zman Date: Tue, 8 Apr 2025 11:59:53 -0400 Subject: [PATCH] asdf --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index d12baab..034042d 100644 --- a/app.py +++ b/app.py @@ -57,6 +57,7 @@ def convert_pdf_to_images(pdf_path): # Function to print address labels def print_address_label(images, pdf_path): try: + processed_images = [] for image in images: if 'address' in pdf_path.lower(): target_width = 1660 @@ -64,11 +65,13 @@ def print_address_label(images, pdf_path): image = image.convert("RGB") image = image.resize((target_width, target_height), Image.LANCZOS) image = image.rotate(90, expand=True) + processed_images.append(image) else: target_width = 1164 target_height = 1660 image = image.convert("RGB") image = image.resize((target_width, target_height), Image.LANCZOS) + processed_images.append(image) qlr = BrotherQLRaster(printer_model) qlr.exception_on_warning = True @@ -76,7 +79,7 @@ def print_address_label(images, pdf_path): app.logger.info("Converting image to printer instructions...") instructions = convert( qlr=qlr, - images=images, + images=processed_images, label='102x152', threshold=70.0, dither=False,