[reportlab-users] Drawing things alongside paragraphs

Tim Roberts timr at probo.com
Thu Dec 18 13:46:10 EST 2008


Donn wrote:

> 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.


I'm not convinced this is possible, without writing a custom paragraph
flowable. The whole principle of platpus flowables is that each
flowable consists of one kind of "thing"; you are violating this principle.

Do you really need flowable paragraphs? For 99% of the reportlab work I
do, I forget about platypus and just draw directly on the canvas. If
you don't use platypus, what you ask is very easy to do.


> Oh, I tried using an <img> tag (in my paragraph) but it never draws the

> images. I tried pngs, jpgs and gifs.


The platypus paragraph parser doesn't handle <img> tags.

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list