简体   繁体   English

如何在Android中集成Foxit PDF Reader?

[英]How to integrate Foxit PDF Reader in Android?

I have followed these steps in order to compile the Foxit library: 我已按照以下步骤来编译Foxit库:

1) Download and install the Eclipse IDE (http://www.eclipse.org/), the Android SDK, ADT plugin for Eclipse, and the Android NDK (http://developer.android.com/sdk/index.html).
a) For Windows use, also download and install Cygwin (http://www.cygwin.com/). During Cygwin setup, make sure to include the “Devel -> make” package.
2) Download the Foxit embedded SDK Package.
3) Extract the Foxit embedded SDK Package to any directory.
4) Place the Foxit embedded SDK library and header files in fpdfemb_android/examples/demos/bin and include directory.
5) Build the NDK layer.
a) Open the Android.mk makefile in fpdfemb_android/examples/demos/demo(like “demo_view”)/jni/ in a text editor and fill in the Foxit library name in the area designated for LOCAL_LDLIBS, dropping the lib prefix:
The demo is shipped as:
LOCAL_LDLIBS +=../bin/# fill in library name here
To add downloaded libfoxit.a from step 2, fill in as:
LOCAL_LDLIBS :=../bin/libfoxit.a
If the library provide is not named “libfoxit.a” please adjust accordingly.
b) Open Cygwin (Windows), or a terminal (Linux based), and navigate to the fpdfemb_android/examples/demos/demo(like “demo_view”) directory. Run “ndk-build –B” to build the NDK/JNI layer.
Example:
me@myStation /myProjectPath/ > ndk-build –B
This assumes that the ndk directory is part of the $PATH environment variable. The command can also be qualified with the path to the NDK directory.

But then I'm getting this error in the terminal: 但是然后我在终端中收到此错误:

Android NDK: WARNING:jni/Android.mk:fpdfembedsdk: non-system libraries in linker flags: jni/../../bin/libfoxit.a Android NDK:警告:jni / Android.mk:fpdfembedsdk:链接器标志中的非系统库:jni /../../ bin / libfoxit.a
Android NDK: This is likely to result in incorrect builds. Android NDK:这很可能导致构建错误。 Try using LOCAL_STATIC_LIBRARIES 尝试使用LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK:或LOCAL_SHARED_LIBRARIES而不是列出
Android NDK: current module Android NDK:当前模块
make: * No rule to make target `–B'. make: *没有将目标设为-B的规则。 Stop. 停止。

Could you please tell me if there is any way to resolve this? 您能否告诉我是否有解决方法?

Thank you. 谢谢。

I recommend trying Foxit's new MobilePDF SDK for Android which will provide most of the functionality found in the embedded PDF SDK that you've previously tried but it includes a user interface and can be integrated into your Android projects quickly. 我建议尝试使用Foxit的新版Android MobilePDF SDK,它将提供您以前尝试过的嵌入式PDF SDK中的大多数功能,但是它包含一个用户界面,可以快速集成到您的Android项目中。

http://www.foxitsdk.com/products/mobile-pdf-sdk/ http://www.foxitsdk.com/products/mobile-pdf-sdk/

This SDK replaces Foxit's embedded SDK. 该SDK替代了Foxit的嵌入式SDK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM