Ilyas KHIAT
commited on
Commit
·
f9a45b7
1
Parent(s):
6e49f2d
pdf export
Browse files- export_doc.py +1 -5
- packages.txt +3 -1
export_doc.py
CHANGED
@@ -139,12 +139,8 @@ def create_pdf_from_markdown(logo_path, conversation,summary,brand_name,graph_ht
|
|
139 |
f.write(footer_html)
|
140 |
|
141 |
# Convert HTML to PDF with header and footer
|
142 |
-
pdf = pdfkit.from_file("
|
143 |
'footer-right': '[page]/[toPage]',
|
144 |
-
'footer-font-size': '10',
|
145 |
-
'footer-spacing': '5',
|
146 |
-
'footer-line': True,
|
147 |
-
'margin-top': '5',
|
148 |
|
149 |
})
|
150 |
return pdf
|
|
|
139 |
f.write(footer_html)
|
140 |
|
141 |
# Convert HTML to PDF with header and footer
|
142 |
+
pdf = pdfkit.from_file("temp.html", options={
|
143 |
'footer-right': '[page]/[toPage]',
|
|
|
|
|
|
|
|
|
144 |
|
145 |
})
|
146 |
return pdf
|
packages.txt
CHANGED
@@ -1 +1,3 @@
|
|
1 |
-
wkhtmltopdf
|
|
|
|
|
|
1 |
+
wkhtmltopdf
|
2 |
+
build-essential
|
3 |
+
libgl1-mesa-dev
|