[reportlab-users] Images in PDFs in Google Appengine

john at thinkwave.com john at thinkwave.com
Sun Aug 17 20:54:06 EDT 2008


Hello

I am using Google Appengine, and am successfully generating text-based PDF documents using Platypus and ReportLab. Now, I'd like to include images in the reports, and am getting stuck.

First: Google does not support PIL. It does provide it's own module to save an image to a blobproperty as a jpeg file. From what I understand, if I use a jpeg file from the datastore, it should render, even if PIL is not installed?

But I'm having problems getting this to work. If I assign the model.blob value to a variable, and place the variable
in the table ([item]) - I get UnicodeDecodeError exceptions. If I try
to retrieve the image from my handler (which outputs the image as a mimetype image/jpg) - I get Imaging Library not
available errors.

Can someone provide me with some pointers how I'd go about successfully taking a jpeg stored in a blobproperty, and getting it included into a platypus table, without having the application start loading PIL modules? Thanks -

johnP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080817/d0f6b926/attachment.html>


More information about the reportlab-users mailing list