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

自動ラッピングが必要な場合は、ReportLab で Platypus または RML を使用することをお勧めします。キャンバスに直接描画する場合は、文字列のラッピングを自分で管理する必要があります。

于 2013-08-09T13:43:05.170 に答える