Ilyas KHIAT commited on
Commit
8be7fae
·
1 Parent(s): 32d7765

pdf export

Browse files
Files changed (1) hide show
  1. export_doc.py +1 -2
export_doc.py CHANGED
@@ -137,10 +137,9 @@ 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
- f.close()
141
 
142
  # Convert HTML to PDF with header and footer
143
- pdf = pdfkit.from_file("temp.html", options={
144
  'footer-html': 'footer.html',
145
  'footer-right': '[page]/[toPage]',
146
  'footer-font-size': '10',
 
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("footer.html", options={
143
  'footer-html': 'footer.html',
144
  'footer-right': '[page]/[toPage]',
145
  'footer-font-size': '10',