Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar
Find #mupdf on Discord
Do you have any feedback on this page?

# Quick Start Guide

## Get the MuPDF source code

There are a few options for acquiring the source code as follows:

- Download an official MuPDF release here: MuPDF Releases.

- Check out the Github repository here: MuPDF on Github.

- Or check out the latest development source directly from our canonical git repository: `git clone --recursive git://git.ghostscript.com/mupdf.git`.

Note

If you have checked out a git repo then in the “mupdf” directory, update the third party libraries with: `git submodule update --init`.

## Building the library

### Windows

On Windows there is a Visual Studio solution file in `platform/win32/mupdf.sln`.

Using Microsoft Visual Studio

To build the required DLLs, load `platform/win32/mupdf.sln` into Visual Studio, and select the required architecture from the drop down - then right click on `libmupdf` in the solution explorer and choose “Build”.

### macOS

Build for macOS with the following Terminal command:

    make prefix=/usr/local install

This will then install the viewer, command line tools, libraries, and header files on your system.

### Linux

You will also need the X11 headers and libraries if you’re building on Linux. These can typically be found in the xorg-dev package.

Alternatively, if you only want the command line tools, you can build with `HAVE_X11=no`.

The new OpenGL based viewer also needs OpenGL headers and libraries. If you’re building on Linux, install the `mesa-common-dev`, `libgl1-mesa-dev` packages, and `libglu1-mesa-dev` packages. You’ll also need several X11 development packages: `xorg-dev`, `libxcursor-dev`, `libxrandr-dev`, and `libxinerama-dev`. To skip building the OpenGL viewer, build with `HAVE_GLUT=no`.

To install the viewer, command line tools, libraries, and header files on your system:

    make prefix=/usr/local install

To install only the command line tools, libraries, and headers invoke `make` like this:

    make HAVE_X11=no HAVE_GLUT=no prefix=/usr/local install

Note

Results of the build can be found in `build/release` in your “mupdf” folder.

## Validating your installation

From the command line you should now have the following MuPDF commands available:

- mupdf-gl A handy viewer UI.

- muraster Can be used to convert PDF pages to raster images.

- mutool An all purpose tool for dealing with PDF files.

## Supported file formats

MuPDF supports the following file formats:

`pdf`, `epub`, `xps`, `cbz`, `mobi`, `fb2`, `svg`

And a suite of image types, e.g. `png`, `jpg`, `bmp` etc.

Do you have any feedback on this page?

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, CA 94129, USA, for further information.