2024-09-28 03:18:13 发布
网友
如何在python中向带编号的reportlab PDF添加字符。示例:
其他: a) 第一项 b) 一秒钟
如何添加“.”、“)”、“-”,我曾运行过:
Myitems.append(ListFlowable([ ListItem(Paragraph("text", styleLeft), leftIndent=20)], bulletType='a', leftIndent=20, start=1))
from reportlab.lib.enums import TA_JUSTIFY from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.lib.styles import getSampleStyleSheet doc = SimpleDocTemplate("form_letter.pdf",pagesize=letter, rightMargin=72,leftMargin=72, topMargin=72,bottomMargin=18) styles = getSampleStyleSheet() Story=[] ptext = ''' <seq>) </seq>Some Text<br/> <seq>) </seq>Some more test Text ''' Story.append(Paragraph(ptext, styles["Bullet"])) doc.build(Story)
相关问题 更多 >
编程相关推荐