...master 2026-11-12 (1037e2069+unstaged)

Change Log

For the full list of changes between versions of MuPDF see CHANGES.

Major changes to existing interfaces are listed here.

Why does the API change?

From time to time, during development, it becomes clear that the public API needs to change; either because the existing API has flaws in it, or to accommodate new functionality. Such changes are not undertaken lightly, and they are kept as minimal as possible.

The alternative would be to freeze the API and to introduce more and more compatibility veneers, ultimately leading to a bloated API and additional complexity. We have done this in the past, and will do it again in future if circumstances demand it, but we consider small changes in the API to be a price worth paying for clarity and simplicity.

To minimise the impact of such changes, we undertake to list the API changes between different versions of the library here, to make it as simple as possible for integrators to make the small changes that may be require to update between versions.

The changes listed below only affect existing APIs.

Changes from 1.27 to 1.28

Changes from 1.26 to 1.27

Changes from 1.25 to 1.26

Changes from 1.24 to 1.25

Changes from 1.23 to 1.24

Changes from 1.22 to 1.23

Changes from 1.21 to 1.22

None.

Changes from 1.20 to 1.21

None.

Changes from 1.19 to 1.20

Text search API extended to be able to distinguish between separate search hits.

Changes from 1.18 to 1.19

We were inconsistent with the behaviour of fz_create_ and pdf_create_ functions, in that sometimes they returned a borrowed reference, rather than a reference that the caller had to drop. We now always return a reference that the caller owns and must drop.

Changes from 1.17 to 1.18

None.

Changes from 1.16 to 1.17

The accessors for reading and creating QuadPoints, InkList and Vertices data for Highlight, Underline, StrikeOut, Squiggle, Ink, Polygon, and PolyLine annotation types have been simplified. They now take and return fz_quad and fz_point structs instead of float arrays. We have also added functions to construct the datastructures one piece at a time, removing the need to allocate a temporary array to pass.

To facilitate loading EPUB documents without laying out the entire document at once, we have introduced chapters into the document structure. Each document instead of having just a plain list of pages, now has a list of chapters, and each chapter has a list of pages. Most of the old functions have the same functionality, but we have added several new functions, which if used, will provide significant speedups when jumping to a random page in large EPUB documents.

However, in order to support bookmarks and links using chapters we have had to introduce a new struct fz_location, and the functions to resolve links have changed to use this new struct.

Functions to map between a fixed page number and a fz_location have been added to help facilitate migration to the new API.

The layout information for each chapter can at your option be cached in an “accelerator” file for even faster loading. This will help performance when using the old page number based rather than location based functions.

Changes from 1.15 to 1.16

There has been a major overhaul of the color management architecture. Unless you’re implementing custom devices or interpreters, this should only have a minor impact.

The fz_set_stdout and fz_set_stderr functions have been removed. If you were using these to capture warning and error messages, use the new user callbacks for warning and error logging instead: fz_set_warning_callback and fz_set_error_callback.

The structured text html and xhtml output formats take an additional argument: the page number. This number is used to create an id attribute for each page to use as a hyperlink target.

Changes from 1.14 to 1.15