[reportlab-users] Problems using the drawImage() function of reportlab

William Hudspeth bhudspeth at edac.unm.edu
Thu Feb 9 11:44:22 EST 2006

I earlier reported having problems using drawImage() to insert an image
(PNG) file into my PDF when the function is embedded in a script. I had
made a small error in the path to the image I wanted to insert. I am
running Red Hat Enterprise 4, Python 2.4 and ReportLab 1.20. My
corrected script looks like this:
print 'Content-type: text/html\n'
import sys
from reportlab.pdfgen import canvas

print "<html><head><title>PDF Generation</title></head><body>"
c.drawImage("/var/www/html/tmp/select.png", 15, 150, width=200,
print "</body></html>"


When I enter these commands at the Python prompt, the PDF file is
created exactly as I have specified. However, when I execute the above
script, I get the following error messages:


Segmentation fault


Any help would be greatly appreciated.


More information about the reportlab-users mailing list