GiantAnalytics commited on
Commit
0b9c323
·
verified ·
1 Parent(s): 52b67f0

Update phase3_agents.py

Browse files
Files changed (1) hide show
  1. phase3_agents.py +3 -1
phase3_agents.py CHANGED
@@ -161,6 +161,8 @@ def generate_report(company_name: str, company_data: str,
161
 
162
  # Convert Markdown to PDF (Ensure wkhtmltopdf is installed)
163
  pdf_filename = f"{company_name}_AI_Report.pdf"
164
- pdfkit.from_string(markdown_report, pdf_filename)
 
 
165
 
166
  return pdf_filename # Returns the generated PDF filename
 
161
 
162
  # Convert Markdown to PDF (Ensure wkhtmltopdf is installed)
163
  pdf_filename = f"{company_name}_AI_Report.pdf"
164
+ path_to_wkhtmltopdf = '/usr/bin/wkhtmltopdf' # Update this path if different
165
+ config = pdfkit.configuration(wkhtmltopdf=path_to_wkhtmltopdf)
166
+ pdfkit.from_string(markdown_report, pdf_filename, configuration=config)
167
 
168
  return pdf_filename # Returns the generated PDF filename