# fpdf2

Python PDF\-generation library with page\-layout, text, graphics and limited HTML input tools\.

ID: Q1133 · Revision: 1181

Type: software · License: LGPL\-3\.0\-only[^package] · Status: active

Website: https://py-pdf.github.io/fpdf2/



fpdf2 is a Python library for generating PDF documents and the successor to PyFPDF\. It exposes operations for pages, text, tables, graphics and other PDF features, with automatic page breaks and a basic HTML input path\. Its role is programmatic generation; workflows that incorporate an existing PDF may combine it with a separate manipulation library\.[^home][^combine]

## Capabilities and substitutions

### Programmatic PDF generation — supported

Provides text, tables, images, drawing and automatic page breaks\.[^home]

Use case: Generating PDF documents from Python · Platforms: Python 3\.10\+; OS\-independent base · Region: Version, build and integration requirements apply

### HTML/CSS compatibility — limited

Supports a basic HTML subset rather than full HTML5/CSS; selected inline page\-break controls are documented\.[^html]

Use case: Generating PDF documents from Python · Platforms: Python 3\.10\+; OS\-independent base · Region: Version, build and integration requirements apply

### Complex text shaping — limited

Disabled by default, requires uharfbuzz and excludes Type 1 fonts\.[^shaping]

Use case: Generating PDF documents from Python · Platforms: Python 3\.10\+; OS\-independent base · Region: Version, build and integration requirements apply

### [Substitute for ReportLab Toolkit](/reportlabtoolkit) — limited

Can cover Python\-driven PDF generation; page\-layout APIs and template models require adaptation\.[^home][^reportlab]

Use case: Generating PDF documents from Python · Platforms: Python 3\.10\+; OS\-independent base · Region: Version, build and integration requirements apply

## References

[^home]: [fpdf2 documentation](<https://py-pdf.github.io/fpdf2/>) — Generation features and PyFPDF succession (vendor; retrieved 2026-10-07T12:40:16.084Z)

[^package]: [fpdf2 package metadata](<https://github.com/py-pdf/fpdf2/blob/master/pyproject.toml>) — LGPL\-3\.0\-only, Python 3\.10\+ and dependencies (vendor; retrieved 2026-10-07T12:40:16.084Z)

[^html]: [fpdf2 HTML input](<https://py-pdf.github.io/fpdf2/HTML.html>) — Basic HTML subset, styling exceptions and nesting limits (vendor; retrieved 2026-10-07T12:40:16.084Z)

[^shaping]: [fpdf2 text shaping](<https://py-pdf.github.io/fpdf2/TextShaping.html>) — Opt\-in uharfbuzz, font limitations and bidirectional text (vendor; retrieved 2026-10-07T12:40:16.084Z)

[^combine]: [Combining fpdf2 with pypdf](<https://py-pdf.github.io/fpdf2/CombineWithPypdf.html>) — Generated overlays, new pages and existing document manipulation (vendor; retrieved 2026-10-07T12:40:16.084Z)

[^reportlab]: [ReportLab Platypus](<https://docs.reportlab.com/reportlab/userguide/ch5_platypus/>) — Flow\-based Python PDF generation (vendor; retrieved 2026-10-07T12:40:16.084Z)

Source revision: https://substitutefor.net/entities/Q1133?revision=1181
