Some test text!

Search
Hamburger Icon

Android / Guides

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

No trial license key required.
The trial of Apryse SDK does not require a trial key. A commercial license key is required for use in a production environment. Please fill out our contact form if you do not have a valid license key.
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

    PDFTRON_BASE=path/to/your/extraction/folder/PDFNetAndroid/
  2. 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:

    • PDFTRON_BASE/lib/full/pdftron.aar
    • PDFTRON_BASE/lib/tools.aar

    You can learn more at Apryse Android viewer .

    Now, your app/libs folder should look like this:

    app
    ├── ...
    └── libs
        ├── pdftron.aar
        └── tools.aar
  2. Open the build.gradle file in your app module's directory:

    Edit it to include the following inside the android.defaultConfig section:

    android {
        defaultConfig {
            // ... Anything else you already had
            multiDexEnabled true
            vectorDrawables.useSupportLibrary = true
            manifestPlaceholders = [pdftronLicenseKey:PDFTRON_LICENSE_KEY]
        }
    }

    Also edit the dependencies section and include:

    dependencies {
        // ... Anything else you had here before
    
        implementation files('libs/pdftron.aar')
        implementation files('libs/tools.aar')
    
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'androidx.appcompat:appcompat:1.3.1'
        implementation 'androidx.recyclerview:recyclerview:1.2.1'
        implementation 'com.google.android.material:material:1.5.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
        implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
        implementation "androidx.preference:preference:1.1.0"
    
        implementation "commons-io:commons-io:2.4"
        implementation "org.apache.commons:commons-lang3:3.5"
        implementation "com.google.code.gson:gson:2.8.0"
        implementation "io.reactivex.rxjava2:rxjava:2.2.2"
        implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
        implementation "com.github.clans:fab:1.6.4"
        implementation "androidx.exifinterface:exifinterface:1.3.3"
        implementation "com.squareup.picasso:picasso:2.71828"
        implementation "org.ccil.cowan.tagsoup:tagsoup:1.2.1"
    
        implementation 'androidx.multidex:multidex:2.0.1'
        implementation "androidx.room:room-runtime:2.4.2"
        annotationProcessor "androidx.room:room-compiler:2.4.2"
    }
  3. In your project's root directory, find the gradle.properties file. Copy the following line to it:

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

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

SDK package overview

Download the SDK

Apryse for Android contains the following key files and folders:

File/Folder NameDescription
docsContains the Apryse Android API reference documentation
libContains 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
samplesContains the Java and Kotlin sample projects: Showcase , CompleteReader , and MiscellaneousSamples
legal.txtLegal and copyright information
license.pdfApryse Software License agreement

Next step

View a document

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales