Is it possible to reduce the size of the PDFTron lib as when we build it takes a lot of resources and compile time….code is used
in the emulator and on a Lenovo ThinkPad.
For development I suggest you to use only one of the libs provided, eg, only arm-v7 (or arm-v6, depending on the architecture of the device). This way it will be faster to upload the code to emulator or device for testing.
For deployment, depending on your requirements, if you want to support only one architecture then you can remove the ones you don’t want (eg, libs/armeabi or libs/armeabi-v7a) in the sample project. The armeabi folder contains the .so file for devices with only arm v6 support, while armeabi-v7a folder contains the .so file for devices with arm v7 support (v6 library will run on v7 devices but may not take advantage of all optimizations). If you don’t need to support of v6 devices you can remove v7 library. If you just need to support v7 devices, you can keep v7 and remove v6 lib. If you keep both, Android will install the proper one based on the arm structure of the device.
In case you are deploying you app via Google Play, you can use “Multiple APK Support” (http://developer.android.com/guide/google/play/publishing/multiple-apks.html). The basic idea is to generate separate APKs using either the .so file for arm v6 (libs/armeabi) or the .so file for arm v7 (libs/armeabi-v7a) to have smaller APKs and then publish them as being the same app in Google Play. With this schema, Google Play will automatically identify which APK to install based on the device’s architecture.
If it still sounds too large, we can also trim down the size of .so files (as part of a custom project) to ~4-5mb for a bare viewer. A big chunk of this size (~2.5 MB) goes on base 14 fonts and CMaps which are required for accurate rendering of some PDFs. Most of the files do not require these resources so technically you could download them on demand (instead of as part of the initial app download). Of course this complicates your app logic, but is an option to consider.