The fpdf Package
Thanks to @megc1 for surfacing the capabilities of this package
Reference:
Installation
First install the package using Pip, if necessary:
pip install fpdf
Usage
A basic usage example to generate a new PDF document:
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial", "B", 16)
pdf.cell(40, 10, "Hello World!")
pdf.output("my_generated_document.pdf", "F")
See the package documentation and tutorial for more examples.
Last updated
Was this helpful?