Admittedly, there are a lot of alternatives for creating a pdf in Python, but I prefer working with PyFPDF due to its simplicity.
python -m pip install fpdf # installation from fpdf import FPDF # fpdf classWe import the FPDF class from the “fpdf” package.
After creating a class, it is time to create our first pdf page.
First, we need to create an object of the PDF class.
),’A3′,’A5′,’Letter’,’Legal’) #default pdf = PDF(orientation=’P’, unit=’mm’, format=’A4′)For more information, you can check the original documentation here.
No Comments
Leave a comment Cancel