我正在与ReportLab斗争,我想用它从视图中生成一个PDF作为Django的请求。
我试着得到一个有符号点的列表
但我得到的是:
我怎么能支持“2”呢?子弹的前面,或者我怎么能跳过那个区域?
这是我的密码
lf = ListFlowable([ ListItem(Paragraph(text1, styles["Normal"])),
ListFlowable([ListItem(Paragraph(text1a, styles["Normal"])),
ListItem(Paragraph(text1b, styles["Normal"])),
ListItem(Paragraph(text1c, styles["Normal"])),
ListItem(Paragraph(text1d, styles["Normal"])),
], bulletType='bullet', bulletFontSize= 5, bulletOffsetY= -2, leftIndent=10, start='circle'),
ListItem(Paragraph(text2, styles["Normal"]))
], bulletType='1')
谢谢!
发布于 2020-08-15 12:39:29
因此,为了解决这个问题,我现在想出的办法是在另一个ListFlowable中重新嵌套,并将leftIndent设置为'0‘,将bulletColor设置为'white’。
lf = ListFlowable([
ListFlowable([
ListItem(Paragraph(text1, styles["Normal"]), spaceAfter=12),
ListFlowable([ListItem(Paragraph(text1a, styles["Normal"])),
ListItem(Paragraph(text1b, styles["Normal"])),t
], bulletType='bullet', bulletFontSize= 5, bulletOffsetY= -2, leftIndent=10, start='circle')], bulletColor='white', leftIndent=0),
ListItem(Paragraph(text2, styles["Normal"]), spaceBefore=12),
], bulletType='1', bulletFontSize= 10)
https://stackoverflow.com/questions/63414268
复制相似问题