Spaces:
Runtime error
Runtime error
Update app.py
Browse files205 unmodified lines206207208209210211212213214205 unmodified linespdf.add_page()pdf.set_font("Arial", size=12)# Add strategy content to PDFfor line in strategy.split('\n'):pdf.cell(0, 10, txt=line, ln=True)pdf_output = "investment_strategy.pdf"pdf.output(pdf_output)205 unmodified lines206207208209210211212213214215205 unmodified linespdf.add_page()pdf.set_font("Arial", size=12)# Add strategy content to PDF with UTF-8 encodingfor line in strategy.split('\n'):# Encode the line to UTF-8 and decode it back to handle Unicode characterspdf.cell(0, 10, txt=line.encode('utf-8').decode('latin-1', 'ignore'), ln=True)pdf_output = "investment_strategy.pdf"pdf.output(pdf_output)
app.py+3-2