Ilyas KHIAT
commited on
Commit
·
32d7765
1
Parent(s):
207fedd
pdf export
Browse files- export_doc.py +1 -0
export_doc.py
CHANGED
|
@@ -137,6 +137,7 @@ def create_pdf_from_markdown(logo_path, conversation,summary,brand_name,graph_ht
|
|
| 137 |
# Save the footer HTML to a temporary file
|
| 138 |
with open("footer.html", "w",encoding="utf-8") as f:
|
| 139 |
f.write(footer_html)
|
|
|
|
| 140 |
|
| 141 |
# Convert HTML to PDF with header and footer
|
| 142 |
pdf = pdfkit.from_file("temp.html", options={
|
|
|
|
| 137 |
# Save the footer HTML to a temporary file
|
| 138 |
with open("footer.html", "w",encoding="utf-8") as f:
|
| 139 |
f.write(footer_html)
|
| 140 |
+
f.close()
|
| 141 |
|
| 142 |
# Convert HTML to PDF with header and footer
|
| 143 |
pdf = pdfkit.from_file("temp.html", options={
|