[reportlab-users] Underlining in paragraphs with left indent
Marc Stober
reportlab-users@reportlab.com
Tue, 16 Dec 2003 09:29:40 -0500
Hello:
There is a problem in paragraph.py where if the paragraph has underlined
words, and the paragraph has a left indent greater than 0, the underlines do
not print correctly. Basically, the underlines appear where they should have
been if the paragraph had not been indented.
I submitted a patch in the SourceForge patches area to fix this bug.
Here is some code to reproduce the problem:
from reportlab.platypus import *
from reportlab.lib.styles import ParagraphStyle
doc = SimpleDocTemplate("phello.pdf")
story = []
text = """
Here is some <u>underlined</u> text.
Here is another sentence to make us wrap to another line.
Here is yet another such sentence.
Here is some <u>underlined</u> text.
"""
ps = ParagraphStyle("underline")
story.append(Paragraph(text, ps))
ps = ParagraphStyle("indented")
ps.leftIndent = 40
story.append(Paragraph(text, ps))
doc.build(story)
--
Marc Stober
mstober@dalbar.com