How do I add a breakline in ReporLab in Excel file?

Viewed 25

Suppose that I am fetching data to some excel file in order to send emails programatically, and my content cell shows some long text. Since this content will be emailed in a PDF File I am using ReportLab to create the Canvas. However, I am not able to introduce
tags to introduce a new line.

with breakline tag returns:

caused exception paraparser: syntax error: No content allowed in br tag

My code where I wrap the text in a PDF File:

      style_texto4=ParagraphStyle(name='Normal4', fontName='Times-Roman', fontSize=15)
      texto4=Paragraph(f"{df.set_index('concat').loc[i]['Contenidos']}", style=style_texto4)


      

      style_texto4.leading=16


      texto4.wrapOn(c, 600, 600)
      texto4.drawOn(c, 90, 380)
0 Answers
Related