[reportlab-users] Drawing things alongside paragraphs

Donn donn.ingle at gmail.com
Tue Dec 16 12:08:48 EST 2008


Hi,
New to reportlab. I have been hacking for a while but can't make this work. If
anyone could give me a nudge or two that would be great.

I want something like this:

"Some text or other" ****

The stars are what I want to draw (i.e. I don't want to rely on a unicode
symbol) alongside the preceding text. The text runs down in a frame. Each
line is made from a Paragraph (I use the xml markup).

At the moment I have it drawing boxes but it always breaks the flow and draws
beneath the text. The boxes are generated like so:
D=Drawing(width,18)
D.add(Rect(0, 0, width, 18, fillColor=colors.yellow)

I then:
P = Paragraph(xml)
fl=flowables.KeepTogether([P,D])
story.append(fl)

(My code is kind of long and messy, so I won't post it unless I must.)

Oh, I tried using an <img> tag (in my paragraph) but it never draws the
images. I tried pngs, jpgs and gifs. I am running this all through Apache and
Django, so I may be getting the path to the image messed-up. The docs don't
really say much about paths to this tag.

Well, I hope someone can help!
\d


More information about the reportlab-users mailing list