fpdf2 (original) (raw)

fpdf2 is a library for simple & fast PDF document generation in Python. It is a fork and the successor of PyFPDF (cf. history).

Latest Released Version: Pypi latest version

fpdf2 logo

`from fpdf import FPDF

pdf = FPDF() pdf.add_page() pdf.set_font('Helvetica', size=12) pdf.cell(text="Hello world!") pdf.output("hello_world.pdf") `

Go try it now online in a Jupyter notebook: Open In Colab or Open In nbviewer

Main features

QPDF logo PDF Checker logo VeraPDF logo

Tutorials

Installation

From PyPI:

To get the latest, unreleased, development version straight from the development branch of this repository:

pip install git+https://github.com/py-pdf/fpdf2.git@master

Development: check the dedicated documentation page.

Displaying deprecation warnings

DeprecationWarnings are not displayed by Python by default.

Hence, every time you use a newer version of fpdf2, we strongly encourage you to execute your scripts with the -Wd option (cf. documentation) in order to get warned about deprecated features used in your code.

This can also be enabled programmatically with warnings.simplefilter('default', DeprecationWarning).

Support

For community support, please feel free to file an issue or open a discussion.

They use fpdf2

Online classes & open source projects:

Usage statistics

Star history

Misc