- 我尝试按照github描述中的教程实现Android PDF Viewer Library,但问题是它无限加载pdf文件。除了描述中的步骤之外,我需要做其他事情吗?
- 我找不到关于muPDF库的任何教程,有吗?如何实现它?
- 如果前两个问题没有有用的答案,那么是否有好的pdf库可用于教程和文档?
MuPDF是一个非常好的库,你绝对可以使用它。如果你需要一个使用MuPDF的完整Android应用程序示例,我建议你看一下这个可定制的杂志应用程序,在Github上。
Download MuPDF 1.3 Source from https://code.google.com/p/mupdf/downloads/list unzip to folder c:/mupdf-1.3-source
Install Cygwin: Download and run Run setup-x86.exe from http://cygwin.com/install.html when installing cygwin, make sure you selected make packages and C++ compilers
Make generate. open cygwin terminal, run
cd /cygdrive/
cd c/mupdf-1.3-source
make generate
Install android-ndk: download android-ndk-r9d-windows-x86.zip and unzip it to
c:/android-ndk-r9d
Build mupdf lib: on windows cmd console:
preparation:
cd c:/mupdf-1.3-source/platform/android
copy local.properties.sample local.properties
edit local.properties, uncomment
#sdk.dir=C:\\Program Files (x86)\\Android\\android-sdk
and change to
sdk.dir=REAL andforid-sdk Folder
build:
while still on c:/mupdf-1.3-source/platform/android
, run:
/android-ndk-r9d/ndk-build
Upon the completion of the build, a folder named libs will be created under
c:/mupdf-1.3-source/platform/android
Create android apk.
Open eclipse, create a new android project from existing code, browse to c:/mupdf-1.3-source/platform/android
, now you can create a mupdf apk.