long_line = '''
xhtml2pdf is a html2pdf converter using the ReportLab Toolkit, the HTML5lib and pyPdf. It supports HTML 5 and CSS 2.1 (and some of CSS 3). It is completely written in pure Python so it is platform independent.
'''
can.drawString(0, 700, long_line)
字符串太长了,所以不是所有的都可以在pdf页面中显示,如何自动换行?
答案 0 :(得分:2)
如果你想要自动包装,你可能最好使用Platypus或RML与ReportLab。如果直接在画布上绘图,则必须自己管理字符串包装。