Get started integrating Apryse Android SDK

Welcome to Apryse. This guide will help you integrate a free trial of Apryse Android SDK into your Android Studio projects. You can either integrate Apryse packages automatically using Gradle, or install them manually using .aar files by downloading the SDK. Pick whichever your option you prefer, but integrating with Gradle is the recommended approach. Your free trial includes unlimited trial usage and support from solution engineers.

Manual Integration

Prerequisites

  • Android Studio
  • Project specifications:
    • Minimum API: 16 (using AndroidX)
    • Compile API: 34
    • Recommended target API: 34
    • If your app is using AndroidX you will also need to add android.useAndroidX=true and android.enableJetifier=true in your gradle.properties file. For more, check out adding Apryse using AndroidX.
  • Apryse Android SDK

Download the SDK

Download

No trial license key required.

The trial of Apryse Mobile SDK does not require a trial key. A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.

Keep your license keys confidential.

License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).

Setup

  1. Extract the folder from the .zip file.This article will assume that the path into the extracted PDFNetAndroid library bundle is called PDFTRON_BASE

sh

1PDFTRON_BASE=path/to/your/extraction/folder/PDFNetAndroid/
  1. Create a new project on Android Studio called myApp. Find the path to the app/libs folder. If the libs folder does not exist, create one in the module (for example, myApp/app/libs)For the purposes of this guide, you can start with an Empty Activity.

Integrate Apryse SDK into your Android application

  1. Copy all of the following files into your libs directory:You can learn more at Apryse Android viewer.Now, your app/libs folder should look like this:
    • PDFTRON_BASE/lib/full/pdftron.aar
    • PDFTRON_BASE/lib/tools.aar

sh

1app
2├── ...
3└── libs
4 ├── pdftron.aar
5 └── tools.aar
  1. Open the build.gradle file in your app module's directory:Edit it to include the following inside the android.defaultConfig section:Also edit the dependencies section and include:
Apryse Docs Image

Groovy

1android {
2 defaultConfig {
3 // ... Anything else you already had
4 multiDexEnabled true
5 vectorDrawables.useSupportLibrary = true
6 manifestPlaceholders = [pdftronLicenseKey:PDFTRON_LICENSE_KEY]
7 }
8}

Groovy

1dependencies {
2 // ... Anything else you had here before
3
4 implementation files('libs/pdftron.aar')
5 implementation files('libs/tools.aar')
6
7 implementation 'androidx.legacy:legacy-support-v4:1.0.0'
8 implementation 'androidx.appcompat:appcompat:1.3.1'
9 implementation 'androidx.recyclerview:recyclerview:1.2.1'
10 implementation 'com.google.android.material:material:1.5.0'
11 implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
12 implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
13 implementation "androidx.preference:preference:1.1.0"
14
15 implementation "commons-io:commons-io:2.4"
16 implementation "org.apache.commons:commons-lang3:3.5"
17 implementation "com.google.code.gson:gson:2.8.0"
18 implementation "io.reactivex.rxjava2:rxjava:2.2.2"
19 implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
20 implementation "com.github.clans:fab:1.6.4"
21 implementation "androidx.exifinterface:exifinterface:1.3.3"
22 implementation "com.squareup.picasso:picasso:2.71828"
23 implementation "org.ccil.cowan.tagsoup:tagsoup:1.2.1"
24
25 implementation 'androidx.multidex:multidex:2.0.1'
26 implementation "androidx.room:room-runtime:2.4.2"
27 annotationProcessor "androidx.room:room-compiler:2.4.2"
28}
  1. In your project's root directory, find the gradle.properties file. Copy the following line to it:

sh

1# Add the PDFTRON_LICENSE_KEY variable here.
2# For trial purposes leave it blank.
3# For production add a valid commercial license key.
4PDFTRON_LICENSE_KEY=
  1. Open your AndroidManifest.xml file and add a <metadata> tag inside the <application> tag to be a placeholder for the license key:

XML

1<application>
2<!-- Add license key in meta-data tag here. This should be inside the application tag. -->
3 <meta-data android:name="pdftron_license_key" android:value="${pdftronLicenseKey}"/>
4</application>

SDK package overview

Download the SDK

Download

Apryse for Android contains the following key files and folders:

File/Folder Name

Description

docs

Contains the Apryse Android API reference documentation

lib

Contains the Apryse AAR libraries and the source files to the open-source UI
- /full: Contains full version of pdftron.aar
- /standard: Contains standard version of pdftron.aar
- /src: Contains source code for tools.aar, pdftron-collab.aar

samples

Contains the Java and Kotlin sample projects: Showcase , CompleteReader , and MiscellaneousSamples

legal.txt

Legal and copyright information

license.pdf

Apryse Software License agreement

Next step

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales