Skip to content
Jorj X. McKie edited this page Apr 20, 2016 · 22 revisions

Welcome to the PyMuPDF wiki!

PyMuPDF (formerly known as python-fitz) is a Python binding for MuPDF - "a lightweight PDF and XPS viewer".

MuPDF can access files in PDF, XPS, OpenXPS, CBZ (comic book) and EPUB (e-book) formats.

These are files with extensions *.pdf, *.xps, *.oxps, *.cbz or *.epub (so in essence, with this binding you can develop e-book viewers in Python ...)

PyMuPDF provides access to all important functions of MuPDF from within a Python environment. Nevertheless, we are continuously expanding this function set.

MuPDF stands out among all similar products for its top rendering capability and unsurpassed processing speed.

Check this out yourself:

Compare the various free PDF-viewers. In terms of speed and rendering quality SumatraPDF ranges at the top (apart from MuPDF's own standalone viewer) - since the time it has been changed to use the MuPDF library!

Also do have a look at the performance chapter of the documentation. There you will find several test results that underpin these statements.

While PyMuPDF has been available since several years for an earlier version of MuPDF (1.2), it was until only mid May 2015, that its creator and a few co-workers decided to elevate it to support the current release of MuPDF - which then was 1.7.

Since then we have continuously upgraded PyMuPDF to keep it in sync with MuPDF's ongoing development: in November 2015, version 1.8.0 was published, and, most recently, version 1.9.0 followed in April 2016.

We are determined to keep it that way!

PyMuPDF has been tested on Mac, Linux, Windows 7 and 10, Python 2.7 thru Python 3.5 (x86 and x64 versions). Other platforms should work too as long as MuPDF supports them.

Main differences to the very first version 1.2 include

  • A greatly simplified installation procedure: For Windows and Linux platforms it should come down to running the python setup.py install command. For Windows, binary setups are available, which provide compiler-free installations within seconds.

  • The API has changed: it is now simpler and a lot less cryptic.

  • The supported function set has been significantly increased: apart from rendering, MuPDF's traditional strength, we now also offer a wide range of high performance text extraction options.

  • Demo code has been extended. An additional examples directory is there to contain working programs. Among them are an editor for a document's table of contents, a full featured document joiner and document-to-text conversion utilities.

We invite you to join our efforts by contributing to the the wiki pages, by using what is there - and, of course, by submitting issues and bugs to the site!

Note on the Name fitz

The Python import statement for this library is import fitz. Here is the reason why:

The original rendering library for MuPDF was called Libart. "After Artifex Software acquired the MuPDF project, the development focus shifted on writing a new modern graphics library called Fitz. Fitz was originally intended as an R&D project to replace the aging Ghostscript graphics library, but has instead become the rendering engine powering MuPDF." (Quoted from Wikipedia).

Clone this wiki locally