Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
# MuPDF Android Fitz

This project builds the MuPDF Java bindings for Android.

These bindings provide low level access to the MuPDF library using a handful of
simple Java classes. The API is very similar to the one used by the `mutool
run` JavaScript bindings.

## License

MuPDF is Copyright (c) 2006-2017 Artifex Software, Inc.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <>.

## Prerequisites

You need a working Android development environment, consisting of the Android
SKD and the Android NDK. The easiest way is to use Android Studio to download
and install the SDK and NDK.

You also need GNU make and a working C compiler in order to auto-generate some
files during the build step.

## Building

Download the project *recursively* using Git. Note that it is VERY important to
use the recursive option, in order to also check out the libmupdf submodule and
its submodules.

        $ git clone --recursive git://

Run the make generate step in libmupdf.

	$ make -C libmupdf generate

Edit the file to point to your Android SDK directory:

        $ echo sdk.dir=$HOME/Android/Sdk >

If all tools have been installed as per the prerequisites, build the app using
the gradle wrapper:

        $ ./gradlew assembleRelease

If all has gone well you should now have an android AAR library in

## Maven

The default is to create the Maven artifact in the 'MAVEN' directory. You can
copy those files to the distribution site manually, or you can change the
uploadArchives repository in build.gradle before running the uploadArchives

	$ ./gradlew uploadArchives

You can then copy the artifact files to where you want them:

	$ rsync -av MAVEN/ com.example.maven:public_html/maven/

## Reporting Bugs

The MuPDF developers can be contacted on IRC in the #mupdf channel on

Report bugs on with "MuPDF" as the product, "apps"
as the component, and "Android" as the OS. If you are reporting a problem with
a specific file, please include the file as an attachment.