Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6975869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:25:27+00:00 2026-05-27T17:25:27+00:00

I am working on some stuff that should be able to read PDF in

  • 0

I am working on some stuff that should be able to read PDF in my app and I want to put PDF view in my custom layout. I had preferred Android PDF Viewer but when I performed zoomIn, zoomOut it takes too much time.

So currently I am supposed to use MuPDF open source project to integrate in my project, it’s based on JNI and I am not used to it.

I am using Cygwin to build the library for native code. Hence I am unclear with few things:

  1. how to integrate the MuPDF in my project (as per my question title)?

  2. once I will succeed to integrated it then how can I put PDF reader in my custom view (in the XML or programmaticaly)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:25:27+00:00Added an answer on May 27, 2026 at 5:25 pm

    I don’t know how to do this in Windows using cygwin, because I’m using Ubuntu for the development. But I think the procedure should be the same.

    1. Download the file mupdf-0.9-source.tar.gz here:
      http://code.google.com/p/mupdf/downloads/list?q=source
    2. Download the file mupdf-thirdparty.zip
    3. Extract the sources. By default they will be extracted to the folder: mupdf-0.9/
    4. Extract the file mupdf-thirdparty.zip into the folder mupdf-0.9/
    5. Build the project mupdf-0.9 (For windows you should use VS as it is declared in the readme files)
    6. Then go to the folder mupdf-0.9/android/
    7. Run ndk-build
    8. You can get the following errors:

    Compile thumb : mupdfthirdparty <= jbig2.c
    In file included from /home/yury/programming/android/workspace/mupdf-0.9/android/jni/../../thirdparty/jbig2dec/os_types.h:53,
    from /home/yury/programming/android/workspace/mupdf-0.9/android/jni/../../thirdparty/jbig2dec/jbig2.c:22:
    /home/yury/software/android-ndk-r6b/platforms/android-8/arch-arm/usr/include/stdint.h:48: error: redefinition of typedef 'int8_t'
    /home/yury/programming/android/workspace/mupdf-0.9/android/jni/../../thirdparty/jbig2dec/os_types.h:47: note: previous declaration of 'int8_t' was here

    The solution is explained here: mupdf for android: ndk-build problem (error: redefinition of typedef….)
    However, you can simply comment the lines of the definition of types in the file /thirdparty/jbig2dec/os_types.h

    After that you will receive two libraries: one static and one shared for your android application.

    StaticLibrary  : libmupdfthirdparty.a
    SharedLibrary  : libmupdf.so
    

    This was the answer on the first question. Also there is a great step-by-step guide in the android/Readme.txt file.

    Now the answer on the second question.
    In the application for android you can find test project. There are 3 files:

    • MuPDFActivity.java
    • MuPDFCore.java
    • PixmapView.java

    Simply copy the last two files in your project. And see an example in MuPDFActivity.java how you can embed mupdf layout in your activity. In this file it is done like:

        PixmapView pixmapView;
    //...   
    layout = new RelativeLayout(this);
    //...
        RelativeLayout.LayoutParams pixmapParams =
                          new RelativeLayout.LayoutParams(
                                    RelativeLayout.LayoutParams.FILL_PARENT,
                                    RelativeLayout.LayoutParams.FILL_PARENT);
        pixmapParams.addRule(RelativeLayout.ABOVE,100);
        layout.addView(pixmapView, pixmapParams);
    
        setContentView(layout);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an application that involves some gis stuff. There would be
Overview: I'm working with a hobby app. I want my program to be able
Recently I'm working on some air stuff, and I am using Flash Builder and
I'm doing some PHP stuff on an Ubuntu server. The path I'm working in
Working on some tweaks for a build script, I noticed that the output from
I have been working on some legacy C++ code that uses variable length structures
I am working with some CSS that is poorly written to say the least.
I'm working with a legacy piece of code in some stuff for work which
I'm working with some JS code that I inherited on a project, and in
I'm working on some C++ type system stuff, and I'm having a problem removing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.