擅长:python、mysql、java
<p>使用reportlab尝试此操作,并将其添加到现有代码中:</p>
<pre><code>from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_LEFT
from reportlab.lib.colors import black
styles['small'] = ParagraphStyle(
'small',
parent=styles['default'],
fontSize=8,
leading=8,
)
paragraphs.append(Paragraph('Text with default style<br/>', styles['default']))
paragraphs.append(Paragraph('Text with small style', styles['small']))
</code></pre>