[reportlab-users] Problem adding image

Jim Steil jim at qlf.com
Thu Apr 26 14:36:57 EDT 2007


I'm having trouble getting an image to consistently display on a report
I'm generating. Below are two images. They are both generated using
the EXACT same program. One time I called it and the brown-ish image
shows up. Then when I immediately call it again, the image doesn't show
up. This doesn't happen with any predictable regularity. Sometimes the
image is displayed, and sometimes it isn't. It doesn't matter which
order I run it, I can't find any pattern to why it sometime displays the
image and others, it doesn't. To summarize how I'm building this, this
is what I'm doing:

1. Create a table with 2 rows, 1 column and set the heights,
backgrounds, borders, etc.
2. Inside, build a drawing using the following code:

binDrawing = Drawing(60, 60)


if bobStatus == 0:

binDrawing.add(Image(19.6,40.55,58.85,binLevelHeight,'%s/brown.jpg' %

3. Inside the table cell, add the heading and the drawing. The
listData is the table data that I'm modifying, I create it in a prior
step and I just 'update' the data here.

listData[headerRow[currentCell]][headerCol[currentCell]] =

listData[drawingRow[currentCell]][drawingCol[currentCell]] =

I'm really confused as to why it will work sometimes but not others.
I've done all kinds of verification to know that it IS definitely
finding the image. I've made sure that it isn't a layering issue, that
the image exists but is behind the Rectangle that I've added.

Is there anyone that has mastered the Graphics package run into anything
like this before? Any clues as to where I can go to figure out what is
causing this? Any responses would be appreciated. I'm happy to post
more code if you think it would help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070426/fb607bf9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 6941 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070426/fb607bf9/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 7258 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070426/fb607bf9/attachment-0003.jpe>

More information about the reportlab-users mailing list