-
Notifications
You must be signed in to change notification settings - Fork 530
Home
Welcome to the python-fitz wiki!
python-fitz is a Python binding for MuPDF - "a lightweight PDF and XPS viewer" (which leaves unmentioned that EPUB e-book formats are supported as well).
This binding provides access to almost all functions of MuPDF from within a Python environment.
MuPDF stands out among all similar products for its top rendering capability and unsurmounted processing speed.
You can testify this by yourself:
Try out and compare the various free PDF-viewers. In terms of speed and rendering quality SumatraPDF ranges at the top - and it is based on MuPDF!
While these bindings have been available since several years for an earlier version of MuPDF (1.2), it was until only recently (mid May 2015), that its creator and a few co-workers decided to undertake the effort elevating this repository to the current release of MuPDF, which now counts at version 1.7a.
And we are determined to keep python-fitz current with major MuPDF releases in the future!
This work is almost completed - final tests and bug fixes are underway.
If you know how to build MuPDF on your platform (or you could just use the development binaries), then you can use this repository to make PDF, XPS, OpenXPS and EPUB available to your Python scripts already today - everything works!
python-fitz can be used today on LINUX, Windows 7, Python 2 and Python 3.
So, what do we have?
- We have a ready SWIG-generated wrapper that has been tested on LINUX and Windows installations.
- We have demo scripts for typical use cases that you can take as templates for your development.
- We have a detailed description of how to install under Windows and Python 2.
So, what is still missing then?
- As ever so often: documentation. The documentation is still on the old python-fitz level. The interface has however changed somewhat: compared to 1.2, it has been both, simplified and extended. As for now, you would have to look at the demos to see how things work.
- Some tests are still outstanding, e.g. for the combination Win & Python 3.
- We are still working on some bugs - although everything is already very stable considering we are just 5 days into development!
- We plan to drastically simplify the installation procedure for the majority of potential users. In detail this means that binaries will be supplied e.g. for Windows and popular other platforms to reduce the setup effort (e.g. for Windows the installation will just require to put
fitz.py
and_fitz.pyd
at a place where your Python will find it - and you are all set!).
We invite you to join our efforts by contributing on these wikis, by testing what is there - and, of course, by submitting issues and bugs to this site!
HOWTO Button annots with JavaScript
HOWTO work with PDF embedded files
HOWTO extract text from inside rectangles
HOWTO extract text in natural reading order
HOWTO create or extract graphics
HOWTO create your own PDF Drawing
Rectangle inclusion & intersection
Metadata & bookmark maintenance