Some test text!
Welcome to PDFTron. PDFTron SDK can be integrated with Flutter for both Android and iOS.
This guide will help you integrate a free trial of the PDFTron SDK into your Android applications using Flutter. Your free trial includes unlimited trial usage and support from solution engineers.
For simplicity the following guide is based on a boilerplate flutter app of flutter create myapp
with git diff syntax for adding and removing lines from the boilerplate app.
flutter create myapp
.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
Now add the following items in your myapp/android/app/build.gradle
file:
android {
- compileSdkVersion 27
+ compileSdkVersion 29
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "com.example.myapp"
- minSdkVersion 16
+ minSdkVersion 21
- targetSdkVersion 27
+ targetSdkVersion 29
+ multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
...
}
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" />
Add your PDFTron license key to the myapp/android/gradle.properties
file.
PDFTRON_LICENSE_KEY=INSERT_COMMERCIAL_LICENSE_KEY_HERE_AFTER_PURCHASE
Key can be left empty for a trial
Get the answers you need: Support
Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.
Select a platform to get started with your free trial.
Web
Android
iOS
Windows
Linux
Unlimited usage. No email address required.