[mod_python] ReportLab integration

Graham Dumpleton grahamd at dscpl.com.au
Sat Oct 14 01:53:52 EDT 2006


On 14/10/2006, at 6:25 AM, Jim Steil wrote:

> Can someone help get me pointed in the right direction?  I want to  
> allow a user to request a PDF from my mod_python app.  When they do  
> so, I want to generate the PDF on the fly with ReportLab and then  
> send the resulting PDF back to the browser without saving it  
> anywhere.  I’ve done some searches on the web but can’t seem to  
> find examples of doing this with just mod_python and ReportLab.   
> I’ve seen examples of using other tools, but not just mod_python.   
> This sounds like something others are probably doing, but I need a  
> push in the right direction.  Thanks in advance for your time.
Try:

   http://www.dscpl.com.au/projects/vampire/examples/reportlab/ 
reportlab-demo.pdf

This uses reportlab to generate the PDF.

There is also:

   http://www.dscpl.com.au/projects/vampire/examples/reportlab/ 
trml2pdf-demo.pdf

This uses free version of tool for converting reportlab RML to PDF.

The actual source code for each is at:

   http://www.dscpl.com.au/projects/vampire/source/examples/reportlab/ 
reportlab-demo.py

   http://www.dscpl.com.au/projects/vampire/source/examples/reportlab/ 
_handler.py
   http://www.dscpl.com.au/projects/vampire/source/examples/reportlab/ 
trml2pdf-demo.rml

These happen to use Vampire for the mod_python handler framework,
but you should be able to adapt them to other mod_python handler
systems.

Graham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20061014/65400d22/attachment.html


More information about the Mod_python mailing list