correctly set pdf title and creator

This commit is contained in:
2024-06-06 23:45:57 +02:00
parent 73d739fb0a
commit 53964aff91

View File

@@ -76,6 +76,10 @@ def generateTemplate(width: int, height: int, fondPerdu: int, zoneTranquille: in
for line in LINES:
pdf.line(*line)
# pdf.set_author("template.ar2000.me")
pdf.set_creator("template.ar2000.me")
pdf.set_title(f'{width}x{height}_{kind}')
return pdf
@@ -110,8 +114,9 @@ def generate():
return flask.send_file(
io.BytesIO(pdf),
mimetype="application/pdf",
download_name="test.pdf",
download_name=f'{w}x{h}_{k}.pdf',
)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)
app.run(host='0.0.0.0', port=8000)