fpdf2 (original) (raw)

Pypi latest version Python Support License: LGPL v3

build status codecov Pypi Trusted Publisher: enabled checks: bandit, grype, guarddog, pylint, semgrep

Dependents Downloads per month Contributors GitHub last commit

issues closed PRs closed Pull Requests Welcome first-timers-only Friendlyโ†’ come look at our good first issues

fpdf2 logo

fpdf2 is a PDF creation library for Python:

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

Compared with other PDF libraries, fpdf2 is fast, versatile, easy to learn and to extend (example). It is also entirely written in Python and has very few dependencies:Pillow, defusedxml, & fontTools. It is a fork and the successor of PyFPDF (cf. history).

Development status: this project is mature and actively maintained.

We are looking for contributing developers: if you want to get involved but don't know how, or would like to volunteer helping maintain this lib, open a discussion!

Installation Instructions

pip install fpdf2

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

Features

Our 350+ reference PDF test files, generated by fpdf2, are validated using 3 different checkers:

QPDF logo PDF Checker logo VeraPDF logo

Please show the value

Choosing a project dependency can be difficult. We need to ensure stability and maintainability of our projects. Surveys show that GitHub stars count play an important factor when assessing library quality.

โญ Please give this repository a star. It takes seconds and will help your fellow developers! โญ

Please share with the community

This library relies on community interactions. Please consider sharing a post about fpdf2 and the value it provides ๐Ÿ˜Š

GitHub Repo stars GitHub Repo stars GitHub Repo stars GitHub Repo stars GitHub Repo stars

Documentation

You can also have a look at the tests/, they're great usage examples!

Development

Please check the dedicated documentation page.

Contributors โœจ

This library could only exist thanks to the dedication of many volunteers around the world:

Mariano Reingart Mariano Reingart๐Ÿ’ป David Ankin David Ankin๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿšง ๐Ÿ’ฌ ๐Ÿ‘€ โš ๏ธ Alex Pavlovich Alex Pavlovich๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ฌ ๐Ÿ‘€ โš ๏ธ Lucas Cimon Lucas Cimon๐Ÿ“ ๐Ÿ’ป ๐Ÿ“– ๐Ÿš‡ ๐Ÿšง ๐Ÿ’ฌ ๐Ÿ› Miroslav ล edivรฝ Miroslav ล edivรฝ๐Ÿ’ป โš ๏ธ Florian Bernhart Florian Bernhart๐Ÿ’ป โš ๏ธ Edwood Ocasio Edwood Ocasio๐Ÿ’ป โš ๏ธ
Marcelo Duarte Marcelo Duarte๐Ÿ’ป Roman Kharin Roman Kharin๐Ÿ’ป ๐Ÿค” Christopher Frost Christopher Frost๐Ÿ› ๐Ÿ’ป Michael Kalbermatten Michael Kalbermatten๐Ÿ› ๐Ÿ’ป Yanone Yanone๐Ÿ’ป Leo Zhu Leo Zhu๐Ÿ’ป Abishek Goda Abishek Goda๐Ÿ’ป
Arthur Moore Arthur Moore๐Ÿ’ป โš ๏ธ ๐Ÿ› Bogdan Cuza Bogdan Cuza๐Ÿ’ป Craig Hobbs Craig Hobbs๐Ÿ’ป xitrushiy xitrushiy๐Ÿ› ๐Ÿ’ป Josรฉ L. Redrejo Rodrรญguez Josรฉ L. Redrejo Rodrรญguez๐Ÿ’ป Jรผrgen Gmach Jรผrgen Gmach๐Ÿ’ป Larivact Larivact๐Ÿ’ป
Leonel Cรขmara Leonel Cรขmara๐Ÿ’ป Mark Steadman Mark Steadman๐Ÿ› ๐Ÿ’ป Sergey Sergey๐Ÿ’ป Stan-C421 Stan-C421๐Ÿ’ป Viraj Shah Viraj Shah๐Ÿ’ป cornicis cornicis๐Ÿ’ป moe-25 moe-25๐Ÿ’ป ๐Ÿ‘€ ๐Ÿ”ฌ ๐Ÿ›
Simone Bizzotto Simone Bizzotto๐Ÿ’ป Boonyawe Sirimaha Boonyawe Sirimaha๐Ÿ› T T๐Ÿ’ป ๐ŸŽจ AubsUK AubsUK๐Ÿ’ฌ Georg Mischler Georg Mischler๐Ÿ› ๐Ÿ’ป ๐ŸŽจ ๐Ÿ“– ๐Ÿค” ๐Ÿ’ฌ โš ๏ธ ping ping๐Ÿ› Portfedh Portfedh๐Ÿ“– โœ…
Tabarnhack Tabarnhack๐Ÿ’ป Mridul Birla Mridul Birla๐ŸŒ digidigital digidigital๐ŸŒ Xit Xit๐ŸŒ Alexander Burchenko Alexander Burchenko๐ŸŒ Andrรฉ Assunรงรฃo Andrรฉ Assunรงรฃo๐ŸŒ Quentin Brault Quentin Brault๐ŸŒ
Paula Campigotto Paula Campigotto๐Ÿ› ๐Ÿ’ป ๐Ÿ‘€ bettman-latin bettman-latin๐Ÿ’ป oleksii-shyman oleksii-shyman๐Ÿ’ป ๐ŸŽจ ๐Ÿค” lcomrade lcomrade๐Ÿ“– ๐Ÿ› ๐Ÿ’ป pwt pwt๐Ÿ› ๐Ÿ’ป Martin Cerveny Martin Cerveny๐Ÿ› ๐Ÿ’ป Spenhouet Spenhouet๐Ÿ› ๐Ÿ‘€
mtkumar123 mtkumar123๐Ÿ’ป Davide Consalvo Davide Consalvo๐Ÿ’ป ๐Ÿ’ฌ ๐ŸŽจ Bruno Santos Bruno Santos๐Ÿ› cgkoutzigiannis cgkoutzigiannisโš ๏ธ I Wayan Kurniawan I Wayan Kurniawan๐Ÿ“– Sven Eliasson Sven Eliasson๐Ÿ“– gonzalobarbaran gonzalobarbaran๐Ÿ’ป
Nuttapat Koonarangsri Nuttapat Koonarangsri๐Ÿ“– ๐Ÿ› Sokratis Vasiliou Sokratis Vasiliou๐ŸŒ semaeostomea semaeostomea๐Ÿ“– ๐Ÿ’ป Josuรฉ Millรกn Zamora Josuรฉ Millรกn Zamora๐Ÿ’ป me-suzy me-suzy๐Ÿ› dmail00 dmail00๐Ÿ› ๐Ÿ’ป Gerardo Allende Gerardo Allende๐Ÿ’ป ๐Ÿ”ฌ
Nicholas Jin Nicholas Jin๐Ÿ› Yusuke Yusuke๐Ÿ’ป Tillrzhtgrfho Tillrzhtgrfho๐Ÿ› Dario Ackermann Dario Ackermann๐Ÿ› Tzvi Greenfeld Tzvi Greenfeld๐Ÿ“– ๐ŸŒ devdev29 devdev29๐Ÿ“– ๐Ÿ’ป Johan Bonneau Johan Bonneau๐Ÿ“–
Jesรบs Alberto Muรฑoz Mesa Jesรบs Alberto Muรฑoz Mesaโš ๏ธ ๐Ÿ“– ๐ŸŒ Jaydeep Das Jaydeep Das๐Ÿ’ฌ Sean Sean๐Ÿ’ป Anderson Herzogenrath da Costa Anderson Herzogenrath da Costa๐Ÿ’ฌ ๐Ÿ’ป ๐Ÿ”ฌ ๐Ÿ› ๐Ÿ“– ๐Ÿค” ๐Ÿšง Yi Wei Lan Yi Wei Lanโš ๏ธ CpDong CpDong๐Ÿ’ป ๐Ÿ› ๐ŸŒ CY-Qiu CY-Qiu๐Ÿ›
Markovvn1 Markovvn1๐Ÿ’ป Elad Rapaport Elad Rapaport๐Ÿ’ป SfinxV SfinxV๐Ÿ› bramantoleksono bramantoleksono๐Ÿ› TheNerdy907 TheNerdy907๐Ÿ› Elie Roux Elie Roux๐Ÿ› ๐Ÿค” ๐Ÿ’ป ๐Ÿ’ฌ msalem msalem๐Ÿ“–
Manuel Ruiz Manuel Ruiz๐Ÿ› Noel Noel๐Ÿ› Avik Sarkar Avik Sarkar๐ŸŒ ๐Ÿ“– ๐Ÿ’ฌ aeris07 aeris07๐Ÿ› KamarulAdha KamarulAdha๐Ÿ“– Valerus5685 Valerus5685๐Ÿ› Sebastian Tia Sebastian Tia๐Ÿ’ป
Eugene Selifonov Eugene Selifonov๐Ÿ› Kuth Kuth๐ŸŒ Ruben de Bruin Ruben de Bruin๐Ÿ› ๐Ÿ’ป ๐Ÿ“– stenci stenci๐Ÿ› alcnaka alcnaka๐ŸŒ Tolker-KU Tolker-KU๐Ÿ’ป lfavole lfavole๐Ÿ’ป
Nicolai Wolfrom Nicolai Wolfrom๐Ÿ› Sandra Sandra๐Ÿค” ๐Ÿ’ป navitho navitho๐Ÿ› Sai Harsha Kottapalli Sai Harsha Kottapalli๐Ÿ’ป Rakesh N J Rakesh N J๐Ÿ“– rodos rodos๐Ÿ› Ted Brookings Ted Brookings๐Ÿ’ป
Andy Friedman Andy Friedman๐Ÿ’ป Matt Matt๐Ÿ“– matipos2 matipos2๐Ÿ“– lry12138 lry12138๐ŸŒ Martijn Jasperse Martijn Jasperse๐Ÿ› ๐Ÿ’ป demiurgepy demiurgepy๐Ÿ› Marek Tovlin Marek Tovlin๐Ÿ’ป
Polderrider Polderrider๐ŸŒ Elena ``of Valhalla'' Elena ``of Valhalla''โš ๏ธ Niall O'Callaghan Niall O'Callaghan๐Ÿ› jsid72 jsid72๐Ÿ› Alan Collins Alan Collins๐Ÿ’ป hyperstown hyperstown๐Ÿ–‹ Clock-Speed Clock-Speed๐Ÿ’ป
Darek Darek๐ŸŒ Carl Higgs Carl Higgs๐Ÿ’ป awmc000 awmc000๐Ÿ’ป Scott Smitelli Scott Smitelli๐Ÿ› lcgeneralprojects lcgeneralprojects๐Ÿ› ๐Ÿ’ป Christopher Lane Christopher Lane๐Ÿ“– โš ๏ธ David David๐Ÿ’ป
Sezer Bozkฤฑr Sezer Bozkฤฑr๐ŸŒ Odhy Pradhana Odhy Pradhana๐ŸŒ Li Li๐Ÿ› Matthias Schoettle Matthias Schoettle๐Ÿ“– ๐Ÿ› Steve Simmons Steve Simmons๐Ÿ› Joรฃo Henrique Joรฃo Henrique๐Ÿ“– Bernhard Miklautz Bernhard Miklautz๐Ÿ“–
Bryn Jeffries Bryn Jeffries๐Ÿ› Benoit Charbonneau Benoit Charbonneau๐Ÿค” Philip Jones Philip Jones๐Ÿ› opposss opposss๐Ÿ’ป Dat Le Dat Le๐Ÿ› ๐Ÿ’ป Kaustubh Kaustubh ๐Ÿ’ป Derek Robinson Derek Robinson๐Ÿ›
Kevin Castro Kevin Castro๐Ÿ› jasonfevangsafe jasonfevangsafe๐Ÿ“– ๐Ÿ› ๐Ÿ’ป visheshdvivedi visheshdvivedi๐Ÿ’ป petri-lipponen-movesense petri-lipponen-movesense๐Ÿ’ป Soomin Choi Soomin Choi๐Ÿ’ป Black-Hole Black-Hole๐ŸŒ lka lka๐Ÿ’ป ๐Ÿ“– ๐Ÿค” โœ…
andreaswimmer andreaswimmer๐Ÿ› Mercuron Mercuron๐Ÿ’ป

This project follows the all-contributors specification (emoji key). Contributions of any kind welcome!

Contributors map

(screenshot from January 2023, click on the map above to access an up-to-date online version)

More about those in the documentation.