[reportlab-users] Appengine - Reportlab (Get Photo from Model)
Martinho Arantes
martinhoarantes at gmail.com
Mon Oct 4 13:59:42 EDT 2010
I´m using Google App Engine, Link <https://appengine.google.com/>.
Google App Engine doesn´t support PIL, but i´ve uploaded Reporlab and is
working fine, also with images.
I can build a PDF with some values, retrieve values from entities and get
photos from my source project and print to PDF.
The problem that i´m facing right now is when a user upload a photo, isn´t
displayed on his PDF.
I´ll show you a short pic tinypic.com/r/2ngeont/7, but the image shown is
uploaded by me not by the user.
Martinho Arantes | Gerente AS Barcelos | telemóvel/mobile: +351 969527654 |
morada/address: A3, Km 56, Apartado 600 | 4750 Alheira - Barcelos
2010/10/4 Tim Roberts <timr at probo.com>
> 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.
>
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20101004/d4f6284c/attachment.html>
More information about the reportlab-users
mailing list