Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -328,10 +328,11 @@ def pdf_to_text(contract_file_cmpt, contract_text_tbox, file_name_tbox):
|
|
328 |
return file_text, redline_file_name
|
329 |
|
330 |
def download_pdf(compliance_comments,contract_redline_html,file_name_tbox):
|
331 |
-
|
|
|
332 |
contract_redline_comments = "<h2><u>Contract Redline:</u></h2><br>"+contract_redline_html + "<br><h2><u>Compliance Comments:</u></h2><br>"+compliance_comments
|
333 |
global pdf_download
|
334 |
-
pdf_download = pdfkit.from_string(contract_redline_comments,None)
|
335 |
|
336 |
return {pdf_download_file: file_name_tbox}
|
337 |
|
|
|
328 |
return file_text, redline_file_name
|
329 |
|
330 |
def download_pdf(compliance_comments,contract_redline_html,file_name_tbox):
|
331 |
+
|
332 |
+
config = pdfkit.configuration(wkhtmltopdf="/usr/local/bin/wkhtmltopdf")
|
333 |
contract_redline_comments = "<h2><u>Contract Redline:</u></h2><br>"+contract_redline_html + "<br><h2><u>Compliance Comments:</u></h2><br>"+compliance_comments
|
334 |
global pdf_download
|
335 |
+
pdf_download = pdfkit.from_string(contract_redline_comments,None,configuration=config)
|
336 |
|
337 |
return {pdf_download_file: file_name_tbox}
|
338 |
|