views:

81

answers:

2

I am looking for the best accurate tool for PDF in Python that works like Jinja do for HTML.

What are your suggestions?

+4  A: 

Have a look at ReportLab Toolkit.

You can use templates only with the commercial version, though.

jbochi
You're right and it is a problem since I would like to work from a template in pdf format.
Mamane
Maybe it's an overkill, but you could use Jinja to generate the text and the toolkit to convert the text to pdf.
jbochi
@jbochi: Not overkill, IMO. I think this solution works very well.
S.Lott
+2  A: 

As answered by jbochi, ReportLab is the foundation for almost all Python projects that generate PDF.

But for your needs you might want to check out Pisa / xhtml2pdf. You would generate your HTML with a Jinja template and then use Pisa to convert the HTML to PDF. Pisa is built on top of ReportLab.

Edit: another option I'd forgotten about is wkhtmltopdf

Van Gale