Step 1 : Get [mupdf-1.2-source.zip][1]mupdf-1.2-source.zip
Step 2 : Get [android-ndk-mac-64][2]android-ndk-mac-64
and after few sec. you should have new folder inside mupdf > android > libs > ... use that in your android project. [1]:
How to use MuPDF with your EXISTING Eclipse project:
Copy the 'jni' folder from the /android folder into your existing Eclipse project.
Copy the /thirdparty folder into the 'jni' folder in your project.
Copy the /cbz folder into the 'jni' folder in your project.
Copy the /draw folder into the 'jni' folder in your project.
Copy the /fitz folder into the 'jni' folder in your project.
Copy the /generated folder into the 'jni' folder in your project.
Copy the /pdf folder into the 'jni' folder in your project.
Copy the /scripts folder into the 'jni' folder in your project.
Copy the /xps folder into the 'jni' folder in your project.
Open 'Android.mk' inside the 'jni' folder.
Change
MUPDF_ROOT := ..
to
MUPDF_ROOT := $(TOP_LOCAL_PATH) Save 'Android.mk'.
Open 'Core.mk' inside the 'jni' folder.
Change
MY_ROOT := ../..
to
MY_ROOT := $(LOCAL_PATH) Change all the
..
in LOCAL_C_INCLUDES to
$(LOCAL_PATH) Save 'Core.mk'.
Open 'ThirdParty.mk' inside the 'jni' folder.
Change
MY_ROOT := ../..
to
MY_ROOT := $(LOCAL_PATH) Change all the
..
in LOCAL_C_INCLUDES to
$(LOCAL_PATH) - Save 'ThirdParty.mk'.
- Now execute 'ndk-build' in your project's 'jni' directory.
- Copy everything in the /android/src folder into the 'src' folder in your project.
- Copy everything in the /android/res/drawable folder into the 'res/drawable' folder in your project.
- Copy everything in the /android/res/drawable-ldpi folder into the 'res/drawable-ldpi' folder in your project.
- Copy everything in the /android/res/drawable-mdpi folder into the 'res/drawable-mdpi' folder in your project.
- Copy everything in the /android/res/layout folder EXCEPT main.xml (because if you are copying into an existing project then you should already have your own main.xml or equivalent) into the 'res/layout' folder in your project.
- Copy everything in the /android/res/values folder into the 'res/values' folder in your project. If you already have a 'strings.xml' in your existing project, copy everything in between the '' tags in your /android/res/values/strings.xml into your project's strings.xml (paste between the '' tags). Similarly with the 'colors.xml', if you already have a 'colors.xml' in your existing project, copy everything in between the '' tags in your /android/res/values/strings.xml into your project's strings.xml (paste between the '' tags).
- Open the 'AndroidManifest.xml' in project.
- In between the '' tags paste all the list of activities from
AndroidManifest.xml inside the https://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.2-source.zip&can=2&q= [2]:/android folder, http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2You should copy from your working copy of AndroidManifest.xml inside mupdf.
MuPDF in now in your existing Eclipse project. To use it, call up
com.artifex.mupdf.ChoosePDFActivity.classin your application. This is the main class for MuPDF.To open pdf with pre-fix file:
Uri uri = Uri.parse("path to pdf file");
Intent intent = new Intent(context, MuPDFActivity.class);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(uri);
context.startActivity(intent);
Hope this help :)
Step 1 : Get [mupdf-1.2-source.zip][1]
Step 2 : Get [android-ndk-mac-64][2]
and after few sec. you should have new folder inside mupdf > android > libs > ... use that in your android project. [1]: https://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.2-source.zip&can=2&q= [2]: http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2
Step 1 : Get mupdf-1.2-source.zip
Step 2 : Get android-ndk-mac-64
and after few sec. you should have new folder inside mupdf > android > libs > ... use that in your android project.
How to use MuPDF with your EXISTING Eclipse project:
Copy the 'jni' folder from the /android folder into your existing Eclipse project.
Copy the /thirdparty folder into the 'jni' folder in your project.
Copy the /cbz folder into the 'jni' folder in your project.
Copy the /draw folder into the 'jni' folder in your project.
Copy the /fitz folder into the 'jni' folder in your project.
Copy the /generated folder into the 'jni' folder in your project.
Copy the /pdf folder into the 'jni' folder in your project.
Copy the /scripts folder into the 'jni' folder in your project.
Copy the /xps folder into the 'jni' folder in your project.
Open 'Android.mk' inside the 'jni' folder.
Change
MUPDF_ROOT := ..
to
MUPDF_ROOT := $(TOP_LOCAL_PATH) Save 'Android.mk'.
Open 'Core.mk' inside the 'jni' folder.
Change
MY_ROOT := ../..
to
MY_ROOT := $(LOCAL_PATH) Change all the
..
in LOCAL_C_INCLUDES to
$(LOCAL_PATH) Save 'Core.mk'.
Open 'ThirdParty.mk' inside the 'jni' folder.
Change
MY_ROOT := ../..
to
MY_ROOT := $(LOCAL_PATH) Change all the
..
in LOCAL_C_INCLUDES to
$(LOCAL_PATH) - Save 'ThirdParty.mk'.
- Now execute 'ndk-build' in your project's 'jni' directory.
- Copy everything in the /android/src folder into the 'src' folder in your project.
- Copy everything in the /android/res/drawable folder into the 'res/drawable' folder in your project.
- Copy everything in the /android/res/drawable-ldpi folder into the 'res/drawable-ldpi' folder in your project.
- Copy everything in the /android/res/drawable-mdpi folder into the 'res/drawable-mdpi' folder in your project.
- Copy everything in the /android/res/layout folder EXCEPT main.xml (because if you are copying into an existing project then you should already have your own main.xml or equivalent) into the 'res/layout' folder in your project.
- Copy everything in the /android/res/values folder into the 'res/values' folder in your project. If you already have a 'strings.xml' in your existing project, copy everything in between the '' tags in your /android/res/values/strings.xml into your project's strings.xml (paste between the '' tags). Similarly with the 'colors.xml', if you already have a 'colors.xml' in your existing project, copy everything in between the '' tags in your /android/res/values/strings.xml into your project's strings.xml (paste between the '' tags).
- Open the 'AndroidManifest.xml' in project.
- In between the '' tags paste all the list of activities from
AndroidManifest.xml inside the /android folder, You should copy from your working copy of AndroidManifest.xml inside mupdf.
MuPDF in now in your existing Eclipse project. To use it, call up
com.artifex.mupdf.ChoosePDFActivity.classin your application. This is the main class for MuPDF.To open pdf with pre-fix file:
Uri uri = Uri.parse("path to pdf file");
Intent intent = new Intent(context, MuPDFActivity.class);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(uri);
context.startActivity(intent);
Hope this help :)
This is How I achieve on my mac (2012, intel i5):
Step 1 : Get [mupdf-1.2-source.zip][1]
Step 2 : Get [android-ndk-mac-64][2]
Step 3 : unzip both of them in new folder call Android-pdfAndroid-pdf and rename unzip folder to mupdf and android-ndk (you can call them whatever you like)
Step 4 : open Terminal and use command : cd until you are in android-pdf folder
Step 5 : cd mupdf than command: make (will take about 40 sec. to run all scripts)
Step 6 : cd android (within mupdf dir.)
Step 7 : open finder go to folder Android-pdf that you created than android-ndk drag file call ndk-build into terminal command line and enter (basically adding a path to ndk-build to operate on mupdf lib.)
and after few sec. you should have new folder inside mupdf > android > libs > ... use that in your android project. [1]: https://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.2-source.zip&can=2&q= [2]: http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2
This is How I achieve on my mac (2012, intel i5):
Step 1 : Get [mupdf-1.2-source.zip][1]
Step 2 : Get [android-ndk-mac-64][2]
Step 3 : unzip both of them in new folder call Android-pdf and rename unzip folder to mupdf and android-ndk (you can call them whatever you like)
Step 4 : open Terminal and use command : cd until you are in android-pdf folder
Step 5 : cd mupdf than command: make (will take about 40 sec. to run all scripts)
Step 6 : cd android (within mupdf dir.)
Step 7 : open finder go to folder Android-pdf that you created than android-ndk drag file call ndk-build into terminal command line and enter (basically adding a path to ndk-build to operate on mupdf lib.)
and after few sec. you should have new folder inside mupdf > android > libs > ... use that in your android project. [1]: https://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.2-source.zip&can=2&q= [2]: http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2
This is How I achieve on my mac (2012, intel i5):
Step 1 : Get [mupdf-1.2-source.zip][1]
Step 2 : Get [android-ndk-mac-64][2]
Step 3 : unzip both of them in new folder call Android-pdf and rename unzip folder to mupdf and android-ndk (you can call them whatever you like)
Step 4 : open Terminal and use command : cd until you are in android-pdf folder
Step 5 : cd mupdf than command: make (will take about 40 sec. to run all scripts)
Step 6 : cd android (within mupdf dir.)
Step 7 : open finder go to folder Android-pdf that you created than android-ndk drag file call ndk-build into terminal command line and enter (basically adding a path to ndk-build to operate on mupdf lib.)
and after few sec. you should have new folder inside mupdf > android > libs > ... use that in your android project. [1]: https://code.google.com/p/mupdf/downloads/detail?name=mupdf-1.2-source.zip&can=2&q= [2]: http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2