Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dynamically generate a pdf from Google's appengine?

I'd like to create an application that would run on Google's appengine.

However, this application needs to be able to generate PDFs dynamically.

How could I do this?

like image 523
carrier Avatar asked Nov 29 '08 16:11

carrier


3 Answers

You can use the reportlab library to generate a PDF from Python. You can just include the ReportLab files in with your application's code, or you can include a zip archive of the ReportLab code, and insert it into your application's sys.path.

like image 156
Paul Fisher Avatar answered Nov 04 '22 13:11

Paul Fisher


To overcome the number-of-files limit in google appengine, you could package your reportlib in a zip file and use it. Be sure you check out this issue i bumped into..

http://code.google.com/p/googleappengine/issues/detail?id=1085

Also, you can use pisa, htmllib and pyPdf to generate the pdf using html templates.

All the best.

varun

like image 34
varun Avatar answered Nov 04 '22 12:11

varun


I would recommend PyFPDF, which is a pure-Python port of the lightweight yet highly powerful PHP FPDF library. It is hardly a few dozen kilobytes.

See http://code.google.com/p/pyfpdf/

like image 3
Louis LC Avatar answered Nov 04 '22 14:11

Louis LC