How to generate a PDF File using a Script

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:

  1. 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.

FPDF code repository

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.

FPDF2 official website

FPDF2 code repository

You might also be interested in…

Leave a Reply

Your email address will not be published. Required fields are marked *