Some test text!

1. Integrate

Get started integrating PDFTron Android SDK

Welcome to PDFTron. This guide will help you integrate a free trial of PDFTron Android SDK into your Android Studio projects. You can either integrate PDFTron 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.

Gradle Integration


  • Android Studio

  • Project specifications:

    • Minimum API: 16 (using AndroidX)
    • Compile API: 30
    • Recommended target API: 30
    • If your app is using AndroidX you will also need to add android.useAndroidX=true and android.enableJetifier=true in your file. You can learn more about this here .
No trial license key required.
The trial of PDFTron SDK works without a license key. A commercial license key is required for use in a production environment. Please fill out our licensing form if you do not have a valid license key.
Keep your commercial license key confidential.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).


Create a new project on Android Studio called myApp.

For the purposes of this guide, you can start with an Empty Activity.

Integrate PDFTron SDK into your Android application

  1. Open the build.gradle file in your project's root directory:

    Edit it to include the following inside the allprojects.repositories section to include PDFTron's Maven repository:

    allprojects {
        repositories {
            // ... Anything else you already had
            maven {
                url ""
            // *****Optionally Include if you are using the demo library*****
            maven {
                url ""
            // ***************************************************
    Make sure you have not added the above inside the buildscript section accidentally.
    PDFTron SDK for Android is hosted on a private Maven repository in Amazon S3, so an access token is required to download it. The project only communicates with Amazon S3 in order to download PDFTron SDK for Android. Otherwise, no other communication between your environment and Amazon S3 (or any other external service) is required. If you prefer not to use Amazon S3, you can find an alternative approach here .
  2. Open the build.gradle file in your app module's directory:

    Edit it to add a dependency for the full version of PDFTron:

    android {
        defaultConfig {
            // ... Anything that was already here
            multiDexEnabled true
            vectorDrawables.useSupportLibrary = true
            manifestPlaceholders = [pdftronLicenseKey:PDFTRON_LICENSE_KEY]
    dependencies {
        // ... Anything that was already here
        implementation "com.pdftron:pdftron:9.1.0"
        implementation "com.pdftron:tools:9.1.0"
        implementation 'androidx.multidex:multidex:2.0.1'
        // ***** Optionally include the demo library ****
        implementation "com.pdftron:demo:9.1.0"
        // **********************************************
    The next part of this guide will use DocumentActivity to open and view a document which requires the full version of PDFTron SDK. The standard version has lighter set of features to reduce the size of the APK.You can find out more about the differences between the two versions here . If you would like to use the standard version instead, please take a look at this guide
  3. In your project's root directory, find the 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.
  4. Also in your file, add the following AndroidX flags if they do not already exist:

    # AndroidX package structure to make it clearer which packages are bundled with the
    # Android operating system, and which are packaged with your app's APK
    # Automatically convert third-party libraries to use AndroidX
  5. Open your AndroidManifest.xml file and add a <metadata> tag inside the <application> tag to be a placeholder for the license key:

    ... (attributes)
    <!-- Add license key in meta-data tag here. This should be inside the application tag. -->

Next step

View a document

Get the answers you need: Support