Logo noch kleiner (w=20)

This commit is contained in:
Erik Thiele
2026-07-02 16:02:46 +02:00
parent 6d6aab18ea
commit 1374e47e07

6
app.py
View File

@@ -291,12 +291,12 @@ def invoice_pdf():
logo_name = config.get('logo', '')
logo_path = os.path.join('static', logo_name) if logo_name else ''
if logo_name and os.path.exists(logo_path):
pdf.image(logo_path, x=171, y=12, w=24)
pdf.image(logo_path, x=175, y=12, w=20)
img_w, img_h = image_dimensions(logo_path)
if img_w and img_h:
logo_bottom = 12 + 24 * (img_h / img_w) + 3
logo_bottom = 12 + 20 * (img_h / img_w) + 3
else:
logo_bottom = 12 + 15 + 3
logo_bottom = 12 + 12 + 3
else:
pdf.set_font("Arial", "B", 18)
pdf.set_xy(150, 12)