Opening large PDF files in GNU/Linux: muPDF comes to the rescue

I was recently given an ebook by a friend. It was a photography book, with tons of hi-res images and very little text. When I opened it with Ubuntu, Evince (the default PDF viewer that comes with Ubuntu) gave in: after a few pages, it slowed to a crawl. I did a bit of research, and found the program that rescued my viewing needs: MuPDF. The good news was that I could finally read my book. The bad news was that I found out that the company behind it has in the past misunderstood the terms of the GPL and started a (later withdrawn) litigation against Palm.

The good news: it's amazingly fast (and maybe too simple)

Installing MuPDF is as simple as running sudo apt-get install mupdf in your Debian-based system. Once installed, you can open PDFs by right-clicking on a PDF file.

MuPDF is amazingly fast: it opens my heavy photography book without any strain. It's also amazingly basic in terms of interface: no table of contents, no page number, not even a top menu. There is in fact no interface: in order to use it, you can use its keyboard shortcuts listed in man mupdf or in mupdf's man page online.

MuPDF is so basic mainly because it's meant only really meant to showcase the speed of the FitZ library (the heart of MuPDF), and show developers how to embed FitZ in their applications.

If you wonder how much faster than evince it is, you can have a look at this comparison article between MuPDF and "poppler" (keeping in mind that Poppler is the PDF rendering library used by Evince).

The fact that Poppler is very slow at rendering some documents is documented in an open bug in Launchpad, Things are looking promising: a fix seems to have been released and available in Ubuntu 15.04 "Vivid".

The ugly part

Researching this issue, made me aware of some issues with Artifex Software (the owner of MuPDF) actually understanding the terms of the GPL (in which they released their software).

Development of MuPDF was actually started by Tor Andersson in 2002. Artifex Software acquired MuPDF: their initial goal was to replace the rendering engine of Ghostscript, an interpreter for PostScript and PDF files. However, they focused instead on developing MuPDF and the new Fitz library: a lightweight, super-fast rendering engine for PDF files. In 2005 they released it under the GPL.

However, in 2009 Artifex Software sued Palm for "copyright infringement". Reading the official filing gives you the impression that the people at Artifex don't actually understand the GPL. The filing reads:

Consistent with its history and tradition, Artifex offers MuPDF to the public, free of charge, under the GNU General Public License ("GPL") for non-commercial use

Any free software developer knows that releasing under the GPL is not about offering software to the "public" for "non-commercial use".

The case was unsurprisingly withdrawn by Artifex (although Palm still had to pay a likely hefty bill from their lawyers).

It is safe to use!

While Artifex did sue Palm and then, two years later, withdrew the case, MuPDF is released under a free license, and you can use it for your heavy-weight PDF where Evince simply give in.


Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice is preserved.