[mod_python] Re: How to convert xml file in to pdf using python

Graham Dumpleton grahamd at dscpl.com.au
Tue May 10 07:05:40 EDT 2005


On 10/05/2005, at 5:56 PM, Stephane Bortzmeyer wrote:

> On Tue, May 10, 2005 at 07:06:29AM -0000,
>  tushar liladhar patil <tusharpatil1982 at rediffmail.com> wrote
>  a message of 47 lines which said:
>
>> I have xml files, in my application I want to convert xml files to
>> pdf format and I want to use python.
>
> I agree with Graham, reportlab is very good.
>
> For the other side of the process, the parsing of XML, you have many
> libraries in Python:
>
> http://docs.python.org/lib/markup.html for a start (but there are 
> others)

Another interesting project to look at is:

   http://openreport.org/index.py/static/page/trml2pdf_doc

If you don't want to deal direct with reportlab, you use translation to
convert XML into RML in some way and it has an automatic mechanism for
generating to PDF using reportlab. Not sure whether or not one could
use some XSLT tool to do this or not. If not, possibly still easier to
use reportlab direct.

Graham



More information about the Mod_python mailing list