[reportlab-users] Platypus: Underlining headings

Andy Robinson andy at reportlab.com
Wed Jan 13 04:58:14 EST 2010


2010/1/13 Nick Lo <ingredients.com.au at gmail.com>:

> The idea I'm aiming for is to be able to just drop it in after e.g...

>

> elements.append(Paragraph("Medical information", styles['Heading1']))


The simplest way is with intra-paragraph markup....
elements.append(Paragraph("<u>Medical information</u>", styles['Heading1']))

We had to implement the line-drawing code ourselves in the paragraph
code, and did not think to make it a paragraph style attribute as
well.

If you want more style control, there is stylable 'Horizontal Rule'
which can follow your text...
reportlab.platypus.flowables.HRFlowable

- Andy


More information about the reportlab-users mailing list