MuPDF Documentation

MuPDF is an open source software framework for viewing and converting PDF, XPS, and E-book documents. There are viewers for various platforms, several command line tools, and a software library for building tools and applications.


For Linux and Windows there are two viewers. One is a very basic viewer using x11 and win32, respectively. It has been supplanted by a newer viewer using OpenGL for rendering, which has more features such as table of contents, unicode search, etc. We keep the old viewers around for older systems where OpenGL is not available.

Read the manual for the new Linux and Windows viewer.

Android currently has several different viewers with varying degrees of complexity:

MuPDF mini
A minimal code example of a document viewer.
MuPDF demo
The main app on Google Play. Supports forms and annotations.
A viewer that matches the look & feel of SmartOffice. This product is still in early development.

The iOS viewer is available on the App Store.

Command Line Tools

The command line tools are all gathered into one umbrella command: mutool.

For rendering and converting documents there are two commands available:

mutool draw
This is the more customizable tool, but also has a more difficult set of command line options. It is primarily used for rendering a document to image files.
mutool convert
This tool is used for converting documents into other formats, and is easier to use.

There are also several tools specifically for working with PDF files:

mutool show
A tool for displaying the internal objects in a PDF file.
mutool extract
Extract images and embedded font resources.
mutool clean
Rewrite PDF file. Used to fix broken files, or to make a PDF file human editable.
mutool merge
Merge pages from multiple input files into a new PDF.
mutool create
Create a new PDF file from a text file with graphics commands.
mutool portfolio
Manipulate PDF portfolios.

And finally, there is a tool for doing anything you can imagine:

mutool run
A tool for running Javascript programs with access to the MuPDF library functions.


The library is written in portable C.

There is also a Java library, which uses JNI to provide access to the C library. The Java classes provide an interface very similar to that available in the mutool run command line tool. This Java library is also how you use MuPDF on Android.

If you want to build an application for Android, you have several options. You can base it off one of the existing viewers, or build a new app using the Java library directly.


We welcome patches from outside contributors. If you want to contribute patches to MuPDF, please review and sign the Artifex Contributor License Agreement.

Artifex Software also has a bug bounty program.