[reportlab-users] retrieving an Image file.
Andy Robinson
reportlab-users@reportlab.com
Thu, 8 Jul 2004 18:30:57 +0100
> image = r"c:/window/web/wallpaper/azul.jpg"
> width = 7.5 * inch
> height = 9.5 * inch
> x = 10.25 * inch
> y = 0.5 * inch
> my_canvas = canvas.drawImage(self, image, width=x, height=y, mask=none)
You are confusing the canvas module with the Canvas class, and never
creating a Canvas object. I'd suggest this:
from reportlab.pdfgen.canvas import Canvas
my_canvas = Canvas('myfile.pdf')
my_canvas.drawImage(self, image, width=x, height=y, mask=none)
- Andy Robinson