How to integrate the Apryse libraries from source

The source code for the Tools library can be integrated into your Android app and further customized to meet your needs.

Integrate Apryse libraries from source

Prerequisites

  • An existing Android Studio project running in the latest version of Android Studio
  • Minimum API: 16 (using AndroidX)
  • Compile API: 34
  • Recommended target API: 34
  • Downloaded the Apryse Android SDK:

Download the SDK

Download

This guide will help you integrate the Tools library with your Android Studio project.

  1. Add the following lines in your project's root-level build.gradle file.

Groovy

1allprojects {
2 repositories {
3 // ...
4 flatDir {
5 dirs '../libs'
6 }
7 }
8}
9
10// ...
11ext.mySupportVersion = "1.3.1"
12ext.myBuildToolsVersion = "30.0.2"
13ext.myMinSdkVersion = 16
14ext.myTargetSdkVersion = 34
15ext.myCompileSdkVersion = 34
16
17ext.pdfnetGroup = { dependencyHandler ->
18 delegate = dependencyHandler
19
20 implementation "com.pdftron:pdftron@aar"
21}
22
23ext.supportLibGroup = { dependencyHandler ->
24 delegate = dependencyHandler
25
26 implementation 'androidx.legacy:legacy-support-v4:1.0.0'
27 implementation 'androidx.appcompat:appcompat:$ext.mySupportVersion'
28 implementation 'androidx.recyclerview:recyclerview:1.2.1'
29 implementation 'com.google.android.material:material:1.5.0'
30 implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
31 implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
32 implementation "androidx.preference:preference:1.1.0"
33
34 implementation "commons-io:commons-io:2.4"
35 implementation "org.apache.commons:commons-lang3:3.5"
36 implementation "com.google.code.gson:gson:2.8.0"
37 implementation "io.reactivex.rxjava2:rxjava:2.2.2"
38 implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
39 implementation "com.github.clans:fab:1.6.4"
40 implementation "androidx.exifinterface:exifinterface:1.3.3"
41 implementation "com.squareup.picasso:picasso:2.71828"
42 implementation "org.ccil.cowan.tagsoup:tagsoup:1.2.1"
43
44 implementation 'androidx.multidex:multidex:2.0.1'
45 implementation "androidx.room:room-runtime:2.4.2"
46 annotationProcessor "androidx.room:room-compiler:2.4.2"
47}
  1. Create a new folder named libs in your project's root directory, then copy the following files from the SDK package to this folder:
  2. Open your project in Android Studio and go to File > New > Import Module... Import the lib\src\PDFViewCtrlTools library modules from the SDK package into your project.
  3. Finally, add the MultiDex and Apryse library dependencies to your app by adding the following to your app's module level build.gradle file:

Groovy

1android {
2 defaultConfig {
3 // ...
4 multiDexEnabled true
5 vectorDrawables.useSupportLibrary = true
6 }
7}
8
9dependencies {
10 // ...
11 pdfnetGroup dependencies
12 supportLibGroup dependencies
13
14 implementation project(':PDFViewCtrlTools')
15}

Your project is now running Apryse from source and you can start modifying the Apryse Android libraries in your project.

Next Steps

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales