Q:
I’m currently evaluating the PDFNet SDK product and want to know how
to build your sample program ‘PDFViewCtrlDemo’ using Eclipse. I see
three directories but no instructions and no project file.
A:
In order to build and run the sample app, you have to follow the
following steps:
(1) Set up ADT in Eclipse as described in
http://developer.android.com/guide/developing/building/building-eclipse.html
(2) Then go to “File → New → Projects…”
(3) Select “Android → Android Project…”
(4) Type in the project name (say PDFViewCtrlDemo), and select “Create
project from existing source” and for “Location :”, browse to the /
PDFViewCtrlDemo.
(5) Click “Next” to select the Build Target, say Android 3.0, and then
click “Finish”.
(6) Right click the project “PDFViewCtrlDemo” in the Package Explore
panel and select “Properties”.
(7) Select “Java Build Path → Libraries”
(8) Click “Add Jars…” and browse to “PDFViewCtrlDemo/libs/” and select
PDFNet.jar. You can do this again to select tools.jar.
(9) Copy ‘Lib/PDFNet.jar (armeabi/libPDFNetC.so) (armeabi-v7a/
libPDFNetC.so)’ to the sample’s ‘libs’ folder, respectively. Note that
you may copy both the native libraries under ‘armeabi’ and ‘armeabi-
v7a’ to make the output apk both arm v6 and v7 compatible. Android
will load the proper library during installation. If you know what arm
structure is targeted, you only need to copy one library and remember
to DELETE the other empty folder so that Android won’t get confused.
Then you should be able to build the project.