Some test text!

Setup

Contents

Prerequisites
Installation
Android
iOS

linkPrerequisites

  • PDFTron SDK >= 6.9.0
  • Flutter >= 1.0.0
  • A valid PDFTron license key. If you do not have a license key, please contact sales for a commercial license key or click here to get an evaluation key.

  • A valid integration credential. If you do not have an integration credential, please click here to get an integration credential.

linkInstallation

linkAndroid

For simplicity the following guide is based on boilerplate flutter app flutter create myapp with git diff syntax for adding and removing lines from the boilerplate app.
  1. First follow the Flutter getting started guides to install, set up an editor, and create a Flutter Project. The rest of this guide assumes your project is created by running flutter create myapp.

  2. Add the following dependency to your Flutter project in myapp/pubspec.yaml:

    dependencies:
       flutter:
         sdk: flutter
    +  pdftron_flutter:
    +    git:
    +      url: git://github.com/PDFTron/pdftron-flutter.git
  3. Now add the following items in your myapp/android/app/build.gradle file:

    android {
    -   compileSdkVersion 27
    +   compileSdkVersion 28
    
        lintOptions {
            disable 'InvalidPackage'
        }
    
        defaultConfig {
            applicationId "com.example.myapp"
    -       minSdkVersion 16
    +       minSdkVersion 21
    -       targetSdkVersion 27
    +       targetSdkVersion 28
    +       multiDexEnabled true
            versionCode flutterVersionCode.toInteger()
            versionName flutterVersionName
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
    
    +   configurations.all {
    +       resolutionStrategy.force "com.android.support:appcompat-v7:28.0.0"
    +       resolutionStrategy.force "com.android.support:support-v4:28.0.0"
    +       resolutionStrategy.force "android.arch.lifecycle:runtime:1.0.3"
    +   }
        ...
    }
  4. In your myapp/android/app/src/main/AndroidManifest.xml file, add the following lines to the <application> tag:

    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="myapp"
        android:icon="@mipmap/ic_launcher"
    +   android:largeHeap="true"
    +   android:usesCleartextTraffic="true">

    Additionally, add the required permissions for your app in the <manifest> tag:

    ...
        <uses-permission android:name="android.permission.INTERNET" />
        <!-- Required to read and write documents from device storage -->
    +   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <!-- Required if you want to record audio annotations -->
    +   <uses-permission android:name="android.permission.RECORD_AUDIO" />
  5. Add the following credentials in the myapp/android/gradle.properties file. If you do not have an integration credential, please click here to get an integration credential.

    AWS_ACCESS_KEY=YOUR_ACCESS_KEY_GOES_HERE
    AWS_SECRET_KEY=YOUR_SECRET_KEY_GOES_HERE
  6. Replace lib/main.dart with what is shown here

  7. Check that your Android device is running by running the command flutter devices. If none are available, follow the device set up instructions in the Install guides for your platform.

  8. Run the app with the command flutter run.

linkiOS

For simplicity the following guide is based on boilerplate flutter app flutter create myapp with git diff syntax for adding and removing lines from the boilerplate app.
  1. First, follow the official getting started guide on installation, setting up an editor, and create a Flutter project, the following steps will assume your app is created through flutter create myapp

  2. Open myapp folder in a text editor. Then open myapp/pubspec.yaml file, add:

    dependencies:
       flutter:
         sdk: flutter
    +  pdftron_flutter:
    +    git:
    +      url: git://github.com/PDFTron/pdftron-flutter.git
  3. Run flutter packages get

  4. Open myapp/ios/Podfile, add: An evaluation or commercial license key is required to run PDFTron. If you are evaluating the SDK and do not have a key, please obtain one, and then visit this page via the link included in the trial email. If your company has licensed PDFTron then you already received your key in an email from team@pdftron.com. See sign in for more details.

  5. Run flutter build ios --no-codesign to ensure integration process is sucessful

  6. Replace lib/main.dart with what is shown here

  7. Run flutter emulators --launch apple_ios_simulator

  8. Run flutter run

Get the answers you need: Support

Contents

Prerequisites
Installation
Android
iOS