# fpdf2 **Repository Path**: fearwall/fpdf2 ## Basic Information - **Project Name**: fpdf2 - **Description**: No description available - **Primary Language**: Unknown - **License**: LGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-09 - **Last Updated**: 2024-04-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [](https://pypi.org/pypi/fpdf2#history) [](https://pypi.org/project/fpdf2/) [](https://www.gnu.org/licenses/lgpl-3.0) [](https://github.com/py-pdf/fpdf2/actions?query=branch%3Amaster) [](https://codecov.io/gh/py-pdf/fpdf2)  [](https://libraries.io/pypi/fpdf2/dependents) [](https://pepy.tech/project/fpdf2) [](https://github.com/py-pdf/fpdf2/graphs/contributors) [](https://github.com/py-pdf/fpdf2/commits/master) [](https://github.com/py-pdf/fpdf2/issues) [](https://github.com/py-pdf/fpdf2/pulls) [](http://makeapullrequest.com) [](http://www.firsttimersonly.com/) โ come look at our [good first issues](https://github.com/py-pdf/fpdf2/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) # fpdf2  `fpdf2` is a PDF creation library for Python: ```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: [](https://colab.research.google.com/github/py-pdf/fpdf2/blob/master/tutorial/notebook.ipynb) or [](https://nbviewer.org/github/py-pdf/fpdf2/blob/master/tutorial/notebook.ipynb) Compared with other PDF libraries, `fpdf2` is **fast, versatile, easy to learn and to extend** ([example](https://github.com/digidigital/Extensions-and-Scripts-for-pyFPDF-fpdf2)). It is also entirely written in Python and has very few dependencies: [Pillow](https://pillow.readthedocs.io/en/stable/), [defusedxml](https://pypi.org/project/defusedxml/), & [fontTools](https://fonttools.readthedocs.io/en/latest/index.html). It is a fork and the successor of `PyFPDF` (_cf._ [history](https://py-pdf.github.io/fpdf2/History.html)). **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](https://github.com/py-pdf/fpdf2/discussions)! ## Installation Instructions ```bash pip install fpdf2 ``` To get the latest, unreleased, development version straight from the development branch of this repository: ```bash pip install git+https://github.com/py-pdf/fpdf2.git@master ``` ## Features * Python 3.7+ support * [Unicode](https://py-pdf.github.io/fpdf2/Unicode.html) (UTF-8) TrueType font subset embedding * Internal / external [links](https://py-pdf.github.io/fpdf2/Links.html) * Embedding images, including transparency and alpha channel * Arbitrary path drawing and basic [SVG](https://py-pdf.github.io/fpdf2/SVG.html) import * Embedding [barcodes](https://py-pdf.github.io/fpdf2/Barcodes.html), [charts & graphs](https://py-pdf.github.io/fpdf2/Maths.html), [emojis, symbols & dingbats](https://py-pdf.github.io/fpdf2/EmojisSymbolsDingbats.html) * [Tables](https://py-pdf.github.io/fpdf2/Tables.html) and also [cell / multi-cell / plaintext writing](https://py-pdf.github.io/fpdf2/Text.html), with [automatic page breaks](https://py-pdf.github.io/fpdf2/PageBreaks.html), line break and text justification * Choice of measurement unit, page format & margins. Optional page header and footer * Basic [conversion from HTML to PDF](https://py-pdf.github.io/fpdf2/HTML.html) * A [templating system](https://py-pdf.github.io/fpdf2/Templates.html) to render PDFs in batches * Images & links alternative descriptions, for accessibility * Table of contents & [document outline](https://py-pdf.github.io/fpdf2/DocumentOutlineAndTableOfContents.html) * [Document encryption](https://py-pdf.github.io/fpdf2/Encryption.html) & [document signing](https://py-pdf.github.io/fpdf2/Signing.html) * [Annotations](https://py-pdf.github.io/fpdf2/Annotations.html), including text highlights, and [file attachments](https://py-pdf.github.io/fpdf2/FileAttachments.html) * [Presentation mode](https://py-pdf.github.io/fpdf2/Presentations.html) with control over page display duration & transitions * Optional basic Markdown-like styling: `**bold**, __italics__` * Can render [mathematical equations & charts](https://py-pdf.github.io/fpdf2/Maths.html) * Usage examples with [Django](https://www.djangoproject.com/), [Flask](https://flask.palletsprojects.com), [FastAPI](https://fastapi.tiangolo.com/), [streamlit](https://streamlit.io/), AWS lambdas... : [Usage in web APIs](https://py-pdf.github.io/fpdf2/UsageInWebAPI.html) * 1000+ unit tests running under Linux & Windows, with `qpdf`-based PDF diffing, timing & memory usage checks, and a high code coverage Our 350+ reference PDF test files, generated by `fpdf2`, are validated using 3 different checkers: [](https://github.com/qpdf/qpdf) [](https://www.datalogics.com/products/pdf-tools/pdf-checker/) [](https://verapdf.org) ## 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 ๐ [](https://reddit.com/submit?url=https://github.com/py-pdf/fpdf2&title=fpdf2) [](https://news.ycombinator.com/submitlink?u=https://github.com/py-pdf/fpdf2) [](https://twitter.com/share?url=https://github.com/py-pdf/fpdf2&t=fpdf2) [](https://www.facebook.com/sharer/sharer.php?u=https://github.com/py-pdf/fpdf2) [](https://www.linkedin.com/shareArticle?url=https://github.com/py-pdf/fpdf2&title=fpdf2) ## Documentation - [Documentation Home](https://py-pdf.github.io/fpdf2/) - Tutorial in several languages: [English](https://py-pdf.github.io/fpdf2/Tutorial.html) - [Deutsch](https://py-pdf.github.io/fpdf2/Tutorial-de.html) - [espaรฑol](https://py-pdf.github.io/fpdf2/Tutorial-es.html) - [เคนเคฟเคเคฆเฅ](https://py-pdf.github.io/fpdf2/Tutorial-hi.html) - [portuguรชs](https://py-pdf.github.io/fpdf2/Tutorial-pt.html) - [ะ ัััะบะธะน](https://py-pdf.github.io/fpdf2/Tutorial-ru.html) - [Italian](https://py-pdf.github.io/fpdf2/Tutorial-it.html) - [franรงais](https://py-pdf.github.io/fpdf2/Tutorial-fr.html) - [ฮฮปฮปฮทฮฝฮนฮบฮฌ](https://py-pdf.github.io/fpdf2/Tutorial-gr.html) - [ืขืืจืืช](https://py-pdf.github.io/fpdf2/Tutorial-he.html) - [็ฎไฝไธญๆ](https://py-pdf.github.io/fpdf2/Tutorial-zh.html) - [เฆฌเฆพเฆเฆฒเฆพ](https://py-pdf.github.io/fpdf2/Tutorial-bn.html) - [แแถแแแแแแ](https://py-pdf.github.io/fpdf2/Tutorial-km.md) - [ๆฅๆฌ่ช](https://py-pdf.github.io/fpdf2/Tutorial-ja.html) - [Dutch](https://py-pdf.github.io/fpdf2/Tutorial-nl.html) - Release notes: [CHANGELOG.md](https://github.com/py-pdf/fpdf2/blob/master/CHANGELOG.md) - A series of blog posts: [fpdf2 tag @ ludochaordic](https://chezsoi.org/lucas/blog/tag/fpdf2.html) You can also have a look at the `tests/`, they're great usage examples! ## Development Please check the [dedicated documentation page](https://py-pdf.github.io/fpdf2/Development.html). ## Contributors โจ This library could only exist thanks to the dedication of many volunteers around the world: