[reportlab-users] underlining text broken?

Robin Becker robin at reportlab.com
Fri Aug 8 11:59:34 EDT 2008


Volker Haas wrote:

> I have the impression that underlining text is broken.

>

> In the below example the space behind the underlined word is also

> underlined:

>

> from reportlab.platypus.paragraph import Paragraph

> from reportlab.platypus.doctemplate import SimpleDocTemplate

> from reportlab.lib.styles import ParagraphStyle

>

> doc = SimpleDocTemplate('test.pdf')

> elements = [Paragraph('blub <u>underlined</u> blub',

> ParagraphStyle('Normal'))]

> doc.build(elements)

>

>

Yes I think you're right. I think the difficulty is that we split into words at
spaces so that we don't normally have the spaces in the internal representation
at all so if you wanted

Paragraph('blub <u>underlined </u>blub')

we would have a real difficulty. I suppose we ought to be able to handle these
cases properly.
--
Robin Becker


More information about the reportlab-users mailing list