Follow-up question, how do I get PIL to be recognized as installed? I
tried easy_install on the whole system, then on the virtual env, then
copying the PIL/ folder to site-packages, but nothing seems to work.

Thanks,
Arbie

On Apr 4, 10:35 pm, Arbie Samong <phek...@gmail.com> wrote:
> OK update, PIL is being required because I have an image tag in my
> view, I removed the tag and the pdf was downloaded fine. Would love to
> have images written properly, though.
>
> Regards,
> Arbie
>
> On Apr 4, 10:30 pm, Arbie Samong <phek...@gmail.com> wrote:
>
>
>
>
>
>
>
> > OK what I'm trying right now is something straight out of the wiki:
>
> > html = response.render('default/download.html', locals())
>
> > class MyFPDF(FPDF, HTMLMixin):
> >   def header(self):
> >     self.set_font('Arial','B',15)
> >     self.cell(0,10, response.title ,1,0,'C')
> >     self.ln(20)
>
> >   def footer(self):
> >     self.set_y(-15)
> >     self.set_font('Arial','I',8)
> >     txt = 'Page %s of %s' % (self.page_no(), self.alias_nb_pages())
> >     self.cell(0,10,txt,0,0,'C')
>
> > pdf.add_page()
> > pdf.write_html(html)
> > response.headers['Content-Type']='application/pdf'
> > return pdf.output(dest='S')
>
> > and it gives the error:
> > RuntimeError: FPDF error: PIL not installed
>
> > in which I copied the PIL/ folder from /usr/lib/python2.6/dist-
> > packages/PIL to the web2py/site-packages/ folder and no effect. PIL is
> > already installed in the system, as well as in the virtualenv I'm
> > using.
>
> > Regards,
> > Arbie
>
> > On Apr 4, 10:15 pm, Arbie Samong <phek...@gmail.com> wrote:
>
> > > When trying it out on localhost:8080 using the appengine sdk it
> > > returns an IO error pointing out that writes aren't allowed. I'll be
> > > looking into StringIO, thanks for the tip Massimo
>
> > > Regards,
> > > Arbie
>
> > > On Apr 4, 10:10 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > > wrote:
>
> > > > does myfpdf require file writing? I did not check? If it does it
> > > > should be easy to change it to use a StringIO instead.
>
> > > > On Apr 4, 9:08 am, Arbie Samong <phek...@gmail.com> wrote:
>
> > > > > Did anyone figure out how to let users download pdf's that contains
> > > > > data from the database under GAE? Appengine does not allow file
> > > > > writing, and most pdf writing libraries I've tried involves
> > > > > temporarily writing in the disk.

Reply via email to