auto open generated menu pdf (weekly)

This commit is contained in:
Mateo Körber Belmonte
2025-02-28 16:35:39 +01:00
parent e891dacc12
commit b25ddc5924
4 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ df = df.fillna("")
# Dateien einlesen
pdf_template = os.path.join(base_dir, "../../data/speiseplan_vorlage.pdf")
pdf_temp = os.path.join(base_dir, "../../data/temp_speiseplan.pdf")
pdf_output = os.path.join(base_dir, "../../data/speiseplan_fertig.pdf")
pdf_output = os.path.join(base_dir, f"../../frontend/public/data/{week}.pdf")
# Schriftarten registrieren
pdfmetrics.registerFont(TTFont("FiraSans", os.path.join(base_dir, "../../frontend/public/resources/fonts/FiraSans-Regular.ttf")))
+1 -1
View File
@@ -215,7 +215,7 @@ app.post('/generate-pdf', (req, res) => {
if (type === 'week') {
console.log('Generating PDF for week:', val);
pdfPath = `python.exe .\\scripts\\writePdf.py ${val}`;
pdfPath = `python3 scripts/writePdf.py ${val}`;
} else {
console.log('Generating PDF for daily:', val);
}