This is the MuPDF C API guide for developers. In this document we will guide you through the public and stable bits of the MuPDF library. This is intended to both provide an introduction to new developers wanting to use low level features of MuPDF, and as a reference guide to the public interface.
We will be explaining the basics, enough to get you started on a single threaded application. There are more functions and data structures used internally, and there are also ways to use MuPDF from multiple threads, but those are beyond the scope of this document.
The functions and structures documented in this document are what we consider stable APIs. They will rarely change, and if they do, any such changes will be noted in the “api-changes” document along with instructions for how to update your code.
The MuPDF fitz library is the core C API for rendering and
manipulating PDF, XPS, EPUB, and other document formats. The public API
is exposed through the include/mupdf/fitz/ header files,
all of which are collected under the umbrella header
mupdf/fitz.h.
If you wonder where the prefix “fz” and name Fitz come from, MuPDF originally started out as a prototype of a new rendering library architecture for Ghostscript. It was to be a fusion of libart and Ghostscript. History turned out differently, and the project mutated into a standalone PDF renderer now called MuPDF. The “fz” prefix for the graphics library and core modules remains to this day.
The library is organised into functional groups: