[Image-SIG] Images in Zope/ReportLab
Heiner de Wendt
Wed, 9 May 2001 09:33:24 +0200
I'm trying since days to get this working, and start becoming
I want to use Zope and ReportLab to create PDFs from within Zope. It
works in general, but I don't manage to include images in the PDFs.
When I do it locally (i.e. without Zope), it works fine, but I just
don't manage to access the images in the ZODB in the right way.
Here's an example code:
from reportlab.pdfgen import canvas
c = canvas.Canvas("/opt/zope/2-3-0/pdffiles/pdf1.pdf")
I've tried various things in the "drawInlineImage" line, even
directly giving the image name ('image1'), but ReportLab doesn't find
The strings my1 and my2 give the following results:
my1 (which is self.image1.id) : <Python Method Object at 8b785f0>
my2 (which is self.image1): <img src="[complete URL here]/image1"
alt=".." height="80" width="100" border="0"/>
So, when creating the strings, the image *is* found. I just don't
know how to correctly access it in the drawInlineImage line.
Can someone PLEASE help me? I'm really somewhat desperate by now...
Big thanks in advance,