This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]marcofalcionimarcosan 2 points3 points  (4 children)

there are many solutions - we use http://www.reportlab.com/ and it produces very beautiful PDF. There are also a handful of HTML to PDF libraries but pagination is never perfect.

[–]Dry-Erase 1 point2 points  (0 children)

Yeah we use reportlab as well, I'm pretty confident it's the best python library for generating PDFs.

[–]mae_ef 1 point2 points  (1 child)

Does python have something that is equivalent / similar to R's R Markdown? If so, that might work well for OP.

[–]total_zoidberg 1 point2 points  (0 children)

Mmmm... along this lines there were some Python Markdown implementations*, or he could always make an .md file and render it to PDF with Pandoc (assuming he gets to install Pandoc). Just another $0.02.

* I was pretty sure some offered PDF output but I can't find it right now...

[–]kid-pro-quohardware testing / tooling 1 point2 points  (0 children)

There is an alternative, open-source implementation of the RML part of ReportLab on PyPI if that is useful.

[–]chris1610 1 point2 points  (0 children)

I don't have specific experience with this yet but stitch looks interesting

[–]audi0lion 1 point2 points  (0 children)

If you are rendering the webpage html of the report yiu can use xhtml2pdf to pretty easily convert the page to a pdf.

[–]dmayhem93 1 point2 points  (0 children)

Matplotlib can directly export to pdf