asdf
This commit is contained in:
parent
357e47cc73
commit
fe07e61505
7
app.py
7
app.py
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user