This post explains methods to generate a PDF File using a script.
Methods to generate a PDF File using a Script
Methods to generate a PDF file using a script featured on this post:
- Using Python
Method 1: Using Python
There are different Python libraries to generate PDFs:
- FPDF
- FPDF2
FPDF is a project that is stalled but it does not want to be merged with FPDF2 to keep compatibility with legacy systems.
As of 2025, last update was from 2017 so it not recommended to use the original FPDF on new projects.
FPDF2 is a fork from FPDF project that is maintained and alive as of 2025.
You can find on this external link the official FPDF2 tutorial.