Skip to main content

Python bindings for the PDF rendering library MuPDF

Project description

Release date: April 10, 2021

Authors

  • Jorj X. McKie

  • Ruikai Liu

Introduction

PyMuPDF (current version 1.18.12) is a Python binding with support for MuPDF (current version 1.18.*), a lightweight PDF, XPS, and E-book viewer, renderer and toolkit, which is maintained and developed by Artifex Software, Inc.

MuPDF can access files in PDF, XPS, OpenXPS, CBZ, EPUB and FB2 (e-books) formats, and it is known for its top performance and high rendering quality.

With PyMuPDF you can access files with extensions like .pdf, .xps, .oxps, .cbz, .fb2 or .epub. In addition, about 10 popular image formats can also be handled like documents: .png, .bmp, .gif, .tiff, etc..

PyMuPDF should run on all platforms that are supported by both, MuPDF and Python 3.6+. These include, but are not limited to, Windows, Mac OSX and Linux, 32-bit or 64-bit. If you can generate MuPDF on a Python supported platform, then also PyMuPDF can be used there.

PyMuPDF is hosted on GitHub where you find up-to-date information of its features, our issue tracker, Wikis and much more.

Installation

For all MS Windows versions as well as popular Max OSX and Linux versions, we are providing Python wheels - see the download section of this site and the current release directory of our home page. Other platforms need to download and generate MuPDF first and then build PyMuPDF from sources. Do visit our GitHub home, which has more details on this, including latest bugfixes, pre-releases, etc.

Usage and Documentation

For all document types you can render pages in raster (PNG) or vector (SVG) formats, extract text and access meta information, links, annotations and bookmarks, as well as decrypt the document. For PDF files, these objects can also be created, modified or deleted. Plus you can rotate, re-arrange, duplicate, create, or delete pages and join or split documents.

PDF password protection is fully supported: owner and user passwords, encryption methods and permission levels can be set, changed or removed.

Specifically for PDF files, PyMuPDF provides update access to low-level structure information, supports optional content, handling of embedded files and modification of page contents (like inserting images, fonts, text, annotations and drawings).

Other features include embedding vector images (SVG, PDF) such as logos or watermarks, joining or splitting single PDF pages (including things like posterizing and 2-up / 4-up processing).

You can also create PDF Form fields with support for text, checkbox, listbox and combobox widgets.

Our home page provides many examples and How-Tos for all of this. At a minimum, read the tutorial and the the recipes sections of our documentation.

Written using Sphinx, documentation is available here:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyMuPDF-1.18.12.tar.gz (314.0 kB view hashes)

Uploaded Source

Built Distributions

PyMuPDF-1.18.12-cp39-cp39-win_amd64.whl (5.4 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

PyMuPDF-1.18.12-cp39-cp39-win32.whl (4.9 MB view hashes)

Uploaded CPython 3.9 Windows x86

PyMuPDF-1.18.12-cp39-cp39-manylinux2010_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

PyMuPDF-1.18.12-cp39-cp39-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

PyMuPDF-1.18.12-cp38-cp38-win_amd64.whl (5.4 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

PyMuPDF-1.18.12-cp38-cp38-win32.whl (4.9 MB view hashes)

Uploaded CPython 3.8 Windows x86

PyMuPDF-1.18.12-cp38-cp38-manylinux2010_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

PyMuPDF-1.18.12-cp38-cp38-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

PyMuPDF-1.18.12-cp37-cp37m-win_amd64.whl (5.3 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

PyMuPDF-1.18.12-cp37-cp37m-win32.whl (4.9 MB view hashes)

Uploaded CPython 3.7m Windows x86

PyMuPDF-1.18.12-cp37-cp37m-manylinux2010_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

PyMuPDF-1.18.12-cp37-cp37m-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

PyMuPDF-1.18.12-cp36-cp36m-win_amd64.whl (5.3 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

PyMuPDF-1.18.12-cp36-cp36m-win32.whl (4.9 MB view hashes)

Uploaded CPython 3.6m Windows x86

PyMuPDF-1.18.12-cp36-cp36m-manylinux2010_x86_64.whl (6.4 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

PyMuPDF-1.18.12-cp36-cp36m-macosx_10_9_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page