Python Forum

Full Version: How do I generate reports in pdf format?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a template that is of A4 landscape size and the data to be filled in it is in a csv file. Basically each row for 1 report. I have generated the report in MS Access. But I want without the gui.

Basically data is just stored in the csv file.

I want to create "report.py", which when clicked, will check which is the last invoice number in the excel sheet and collect all the rows with the same invoice number and generate a report with that. Also have the option that when I run via cli, "python3 report.py 5 15". It will print all the invoices from 5 to 15.

My question is what libraries/tools do I use?
reportlab is one option
Here is step by step tutorial
https://www.blog.pythonlibrary.org/2010/...-tutorial/
(Jan-12-2020, 06:17 PM)buran Wrote: [ -> ]reportlab is one option
Here is step by step tutorial
https://www.blog.pythonlibrary.org/2010/...-tutorial/

Thanks.

The whole canvas.drawString() & canvas.line() and complexities for drawing a table. Isn't there a simpler option like HTML? Considering all the post is from 2010, has there been changes?