Generating PDF file in Python

Gary Herron gherron at islandtraining.com
Tue Oct 26 17:38:45 CEST 2010


On 10/26/2010 06:18 AM, Ed Keith wrote:
> I need to generate PDF files and I'm exploring what tools to use. I was planing on using ReportLab, but recently found some references to pango (http://www.pango.org/) and ciaro (http://cairographics.org/) being able to generate PDF files. But am having difficulty finding details.
>
> The program must be cross platform, it needs to run on both windows and Mac and might need to run on Linux in the future. It needs to generate both reports and tables and I would like to make the layout as user configurable as practical.
>
> Can pango - ciaro do  this. How do they compare to ReportLab? Are there other options I have overlooked?
>
>       -EdK
>
> Ed Keith
> e_d_k at yahoo.com
>
> Blog: edkeith.blogspot.com
>
>
>
>

Try a package named reportlab.  It's very comprehensive, opensource, 
written in Python and is cross-platform:

     http://www.reportlab.com/software/opensource/


Here's the Ubuntu Description:

ReportLab library to create PDF documents using Python

ReportLab is a library that lets you directly create documents in
Adobe's Portable Document Format (PDF) using the Python programming 
language.

ReportLab library creates PDF based on graphics commands without
intervening steps. It's therefore extremely fast, and flexible (since
you're using a full-blown programming language).

Sample use cases are:
   * Dynamic PDF generation on the web
   * High-volume corporate reporting and database publishing
   * As embeddable print engine for other applications, including a
     'report language' so that users can customize their own reports.
   * As 'build system' for complex documents with charts, tables and text
     such as management accounts, statistical reports and scientific papers
   * from XML to PDF in one step


Luck,
Gary Herron




More information about the Python-list mailing list