Skip to content
Simple PDF generation for Python (FPDF PHP port)
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
attic unused/unported/unsupported features moved to attic Aug 13, 2010
docs Add some documentation about rotate function (issue #33) Apr 30, 2017
fpdf Fix python 3 template (operator 'in') Jan 26, 2018
tutorial Spelling, grammar, punctuation, etc fixes Apr 14, 2015
mkdocs.yml Unify image loading for jpeg and png. Oct 14, 2015

pyfpdf: FPDF for Python

PyFPDF is a library for PDF document generation under Python, ported from PHP (see FPDF: "Free"-PDF, a well-known PDFlib-extension replacement with many examples, scripts and derivatives).

Compared with other PDF libraries, PyFPDF is simple, small and versatile, with advanced capabilities, and is easy to learn, extend and maintain.


  • Python 2.5 to 3.4 support
  • Unicode (UTF-8) TrueType font subset embedding
  • Barcode I2of5 and code39, QR code coming soon ...
  • PNG, GIF and JPG support (including transparency and alpha channel)
  • Templates with a visual designer & basic html2pdf
  • Exceptions support, other minor fixes, improvements and PEP8 code cleanups

Installation Instructions:

To get the latest development version you can download the source code running:

   git clone
   cd pyfpdf
   python install

You can also install PyFPDF from PyPI, with easyinstall or from Windows installers. For example, using pip:

   pip install fpdf

Note: the Python Imaging Library (PIL) is needed for GIF support. PNG and JPG support is built-in and doesn't require any external dependency. For Python 3, Pillow - The friendly PIL fork is supported.


Documentation Status

For further information, see the project site: or the old Google Code project page

You can’t perform that action at this time.