Integrating Cordova PDF Library with Android
This project is no longer in development. If you are looking for cross-platform solution, check out React Native or Flutter. If you are looking to add to your current Cordova/Ionic project, check out the WebViewer sample.
This guide will help you integrate a free trial of the Apryse Native Plugin for Android applications using Cordova. Your free trial includes unlimited trial usage and support from solution engineers.
Note: There are other approaches that can be used to integrate Apryse technology with Cordova. Please see this FAQ page to find out more about the relative strengths of each approach.
Prerequisites
The Eclipse IDE is not supported.
Setup
If you don't already have a Cordova codebase, start one. If you do, then make sure Android is added as a platform and skip to integration.
Create a new Cordova project called
pdfhello
cordova create pdfhello com.example.pdf pdfhello
cd pdfhelloAdd Android as a platform to build the Cordova application for.
Integrate Apryse Native Plugin into your Cordova Application
Add the
pdftron-cordovaplugin in your project directory.
Navigate to
pdfhello/platforms/androidand add the following line in thegradle.properties file:Key can be left empty for a trial
Navigate to
pdfhello/platforms/android/app/main/and openAndroidManifest.xmlwith your favorite text editor.Change the activity theme toCustomAppTheme:
Navigate to
pdfhello/platforms/android/app/main/com/example/pdf/and openMainActivity.javawith your favorite text editor. Change the base class for the main activity fromCordovaActivitytoCordovaAppCompatActivity:
Next step
Last updated
Was this helpful?