0
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页面中,如何自动换行?

4

1 回答 1

2

如果你想要自动换行,你最好使用 Platypus 或 RML 和 ReportLab。如果您直接在画布上绘制,您将不得不自己管理字符串包装。

于 2013-08-09T13:43:05.170 回答