在 reportlab 中,可以使用 Paragraph 或者 Platypus 类中的带有 "fontSize" 参数的构造函数来设置字符大小。例如:
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import Paragraph
# 设置字体大小为 12pt
style = getSampleStyleSheet()['Normal']
style.fontSize = 12
# 创建一个 Paragraph
p = Paragraph("Hello World!", style)