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

John Pywtorak jpywtora at calpoly.edu
Thu Feb 9 12:44:10 EST 2006


Have you tried disabling the acceleration rl_accel via rl_config.py I 
think?  See if that helps if you had accel enabled.

William Hudspeth wrote:
> 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=canvas.Canvas("test.pdf")
> c.drawImage("/var/www/html/tmp/select.png", 15, 150, width=200,
> height=100)
> c.showPage()
> c.save()
> 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.
> 
> Bill
> 
> 



More information about the reportlab-users mailing list