[reportlab-users] Appengine - Reportlab (Get Photo from Model)

Tim Roberts timr at probo.com
Mon Oct 4 13:32:26 EDT 2010


Martinho Arantes wrote:

> Hi, I´m using the latest reportlab version 2.5 to generate PDF´s.

> I´m also using Google App Engine and Django.

>

> I can get also an image that is in my source folder. Ex: for heading

> or footer.

> Everything went well to generate the PDF, but I'm having great

> difficulty printing to a PDF an image that an user uploaded, like his

> own photo.

> The photo is a property and is defined in model as BlobProperty ().

> ...

>

> I´m getting errors like this one:

> File "C:\Users\hp\workspace\x-ray\src\principal.py", line 441, in post

> image = canvas.ImageReader(StringIO.StringIO(user.photo)) File

> "reportlab.zip\reportlab\lib\utils.py", line 588, in *init* File

> "reportlab.zip\reportlab\lib\utils.py", line 582,

> in *init* RuntimeError: Imaging Library not available, unable to

> import bitmaps only jpegs fileName=<StringIO.StringIO instance at

> 0x04A5A030> identity=[ImageReader at 0x4a62290].


There's a lot of information you have not provided here. Are you doing
this on a web site? How did you deploy Reportlab?

Reportlab requires PIL (Python Imaging Library) in order to process
images. You need to make sure your web server includes PIL.

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20101004/f4305d2c/attachment.htm>


More information about the reportlab-users mailing list