Reportlab - how to introduce line break if the paragraph is too long for a line

后端 未结 3 610
北海茫月
北海茫月 2020-12-19 02:15

I have a list of text to be added to a reportlab frame

style = getSampleStyleSheet()[\'Normal\']
style.wordWrap = \'LTR\'
style.leading = 12
for legend in le         


        
3条回答
  •  伪装坚强ぢ
    2020-12-19 03:06

    This may or may not apply but I just learned that \n which I normally use to introduce new lines in Python strings gets ignored by the Paragraph object of ReportLab.

    From a mailing list I learned that inside Paragraph you can use HTML's
    to introduce the new line instead.

    That works well for me.

提交回复
热议问题