This commit is contained in:
zman 2025-04-07 17:49:19 -04:00
parent 357e47cc73
commit fe07e61505

7
app.py
View File

@ -55,6 +55,13 @@ def print_address_label(pdf_path):
if not image:
raise Exception("Failed to create label images")
if 'address' in pdf_path.lower():
target_width = 1660
target_height = 1164
image = image.convert("RGB")
image = image.resize((target_width, target_height), Image.LANCZOS)
image = image.rotate(90, expand=True)
else:
target_width = 1164
target_height = 1660
image = image.convert("RGB")