How can I create a bulleted list in ReportLab? The documentation is frustratingly vague. I am trying:
text = ur '''
<para bulletText="•">
item 1
</para>
<para bulletText="•">
item 2
</para>
'''
Story.append(Paragraph(text,TEXT_STYLE))
But I keep getting errors like list index out of range. It seems that I can’t put more than one <para></para> in a single call to Paragraph()? I also tried setting TEXT_STYLE.bulletText="•" but that doesn’t work either…
The bulletText argument is actually a constructor to the
Paragraphobject, not the<para>tag 🙂 Try this:Have a look at the examples on page 68 (page 74 now, in 2012) of the ReportLab Documentation, though. The convention in ReportLab seems to be to use the
<bullet>tag, and the docs do warn that you can have only one perParagraphinstance. We render our bullets in ReportLab like so: