create a pdf file

Magnus Lycka lycka at carmen.se
Thu Jun 23 03:47:17 EDT 2005


Alberto Vera wrote:
> Hello:
> 
> I found a script that convert a file to PDF format , but it was made in PHP
> 
> Do you know any script using Python?

What do you mean by "convert a file to PDF format"? The solution
obviously depends on what the file you start with looks like. If
you want to create PDF yourself via API calls, ReportLab is what
you need. If you want to convert an existing file in a format
such as PS or MS Word, there are a lot of solutions out there,
but I don't know of any Python based, and I don't see a point in
using a Python based solution for that kind of task. The simplest
would probably be to invoke a command line tool such as ps2pdf
from your Python script.



More information about the Python-list mailing list