Logo kleiner (w=40) und weiter oben rechts positioniert
This commit is contained in:
18
app.py
18
app.py
@@ -249,8 +249,8 @@ def invoice_pdf():
|
||||
pdf.add_page()
|
||||
|
||||
left = 15
|
||||
col_right = 120
|
||||
col_w = 80
|
||||
col_right = 150
|
||||
col_w = 45
|
||||
|
||||
# --- Header: Absender links, Logo rechts ---
|
||||
pdf.set_font("Arial", "B", 11)
|
||||
@@ -269,18 +269,18 @@ def invoice_pdf():
|
||||
pdf.set_x(left)
|
||||
pdf.cell(col_w, 4, " | ".join(contact_parts), ln=True)
|
||||
|
||||
# Logo rechts (Bild oder Text-Fallback)
|
||||
# Logo rechts oben (Bild oder Text-Fallback)
|
||||
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=col_right, y=15, w=60)
|
||||
pdf.image(logo_path, x=145, y=10, w=40)
|
||||
else:
|
||||
pdf.set_font("Arial", "B", 22)
|
||||
pdf.set_xy(col_right, 15)
|
||||
pdf.set_font("Arial", "B", 18)
|
||||
pdf.set_xy(150, 15)
|
||||
pdf.set_text_color(6, 111, 209)
|
||||
pdf.cell(col_w, 8, "JET", ln=True, align='R')
|
||||
pdf.set_x(col_right)
|
||||
pdf.cell(col_w, 8, "Design", ln=True, align='R')
|
||||
pdf.cell(col_w, 7, "JET", ln=True, align='R')
|
||||
pdf.set_x(150)
|
||||
pdf.cell(col_w, 7, "Design", ln=True, align='R')
|
||||
pdf.set_text_color(0, 0, 0)
|
||||
|
||||
# --- Rechnungsdaten ---
|
||||
|
||||
Reference in New Issue
Block a user