Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FLOSS/Free solution to generate PDF documents in Python?

What is the easiest way to generate PDF documents with embedded fonts in Python without a commercial/restricted library?

I want to generate documents with tabular data and headers/footers. I've tried reportlab, but while powerful, it seems rather difficult to use.

like image 621
Alan Plum Avatar asked Feb 26 '26 10:02

Alan Plum


2 Answers

You can create the document in html and then use WKHTMLTOPDF to convert to pdf... It is licensed GNU but it is a pretty good tool.

like image 151
jle Avatar answered Mar 01 '26 07:03

jle


I've used PISA and been very, very happy. It uses reportlab for you.

http://www.xhtml2pdf.com/doc/pisa-en.html

like image 20
S.Lott Avatar answered Mar 01 '26 09:03

S.Lott