4

This is not a question, asking for a (single) tool, although to answer my question, of course tools are involved. The focus of this question is, asking for advice in which direction to head for.

I have a JAVA-background, so in order to generate any document, Jasper Reports are a good starting point.

Coming to Python, I am facing the requirement, that our customer wants either PDF output oder (ideally) .docx (Office 2010). Since Office 2010 is able to read .odt, my first approach was using py3o to do the job in Libreoffice. But that was a bit dissatisfying. The compatibility between Libreoffice and MS Office isn't as good as expected.

Would it be a better approach to target PDF and use LaTeX to generate the document? I took a look at weasyprint which generates PDF from HTML and CSS. The demo looks quite promising, but I hesitate to use CSS for the job.

My question is: what is the common way to deal with "reports" under python?

P.S.: I should mention, that the software is required to be Open Source or has to have at least a community version

2
  • Weasyprint can be found at weasyprint.org Commented Oct 26, 2015 at 14:26
  • Reporting seems to be an afterthought, as it is with most platforms these days. Commented May 23, 2019 at 10:48

1 Answer 1

3

Here are two popular ones:

pyPDF2

ReportLab

As far as I know ReportLab has a free and paid version.

5
  • Thank you very much. Reportlab looks promising. But i forgot to mention: it has to be free software. Thanks anyway. Commented Oct 26, 2015 at 6:46
  • Well I was reading and they have the open-source version meaning you'll have to redistribute the software as open source as well. That how I understood it. :) Commented Oct 26, 2015 at 10:40
  • It is not the solution, I hexpected or hoped for, but since no other answers are available, I accept this one ;) Commented Oct 27, 2015 at 20:04
  • Well I got a downvote. I was just supposed to comment it but sadly didn't have enough reputation points yet. The answer accepted was much appreciated. Commented Oct 28, 2015 at 9:07
  • It wasn't me ;) I can not understand the decision to downvote. Reportlab is a fair choice. Commented Oct 28, 2015 at 9:30

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.