[reportlab-users] Draw images with canvas and use SimpleDocTemplate

Tim Roberts timr at probo.com
Mon Mar 21 16:22:04 EDT 2011


slothy Rulez a lot wrote:

>

> In front of the text, positioned like the canvas.drawImage method.


But associated with and/or positioned based on the position of some
specific piece of text? Like, for example, if you wanted to draw a
circle around some specific word? That kind of thing requires you to
create a custom flowable. The standard paragraph flowable looks for an
<image> tag, which allows you to embed an image at a specific point in
the text, but if you need to draw something over a specific word, you'll
have to add that yourself.

It's each to draw something at a specific point on the page (you do that
with the first/next page callbacks, where you get a canvas), but if it
depends on the final positioning of a particular word, that's tricky.

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



More information about the reportlab-users mailing list