Jul-27-2021, 03:33 PM
There are several packages available for this:
- Probably the most famous and comprehensive is reportlab (and perhaps most complex to use).
It's a commercial product, but has a free community edition here: https://www.reportlab.com/dev/opensource/
- Easier to use, is pandoc: https://pandoc.org/
can convert to and from a lot of different formats.
see examples here: https://pandoc.org/demos.html
- If your data can be displayed as a dataframe, then without a doubt, pandas is the way to go:
Use read html: https://pandas.pydata.org/pandas-docs/st..._html.html
and then
docstring: https://pandas.pydata.org/pandas-docs/st...rite%20pdf
There is some conversion needed here to get from docstring to pdf, but you can find that with google.
- There are a lot of packages avail in PyPi you will have to visit those that look promising to find right one
see: https://pypi.org/search/?q=pdf&o=
- Never forget google, use following (include quotes in search): "python pdf creation"