Skip to content

Commit 83d470f

Browse files
author
PSPDFKit
committed
Release 2.3.0
1 parent b51b60b commit 83d470f

File tree

7 files changed

+59
-43
lines changed

7 files changed

+59
-43
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [2.3.0] - 01 Jun 2021
2+
3+
- Removes the need of a trial key for running PSPDFKit Flutter in demo mode. (#28297)
4+
- Updates to PSPDFKit for Android 6.6.2 (#29523)
5+
16
## [2.2.2] - 06 May 2021
27

38
- Adds a title image for the plugin frontpage. (#29330)

README.md

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
2626
- The [Android NDK][install ndk]
2727
- An [Android Virtual Device][managing avds] or a hardware device
2828

29+
#### Getting Started
30+
2931
1. Create a Flutter project called `pspdfkit_demo` with the `flutter` CLI:
3032

3133
```bash
@@ -47,19 +49,19 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
4749
4. Modify the minimum SDK version, enable `multidex`, and set the Java compatibility to Java 8 to enable desugaring. All this is done inside the `android` section:
4850

4951
```diff
50-
android {
51-
defaultConfig {
52+
android {
53+
defaultConfig {
5254
- minSdkVersion 16
5355
+ minSdkVersion 21
54-
...
56+
...
5557
+ multiDexEnabled true
56-
...
58+
}
59+
5760
+ compileOptions {
5861
+ sourceCompatibility 1.8
5962
+ targetCompatibility 1.8
6063
+ }
61-
...
62-
}
64+
}
6365
```
6466
6567
5. Open `pubspec.yaml`:
@@ -71,9 +73,9 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
7173
6. Add the PSPDFKit and `path_provider` dependencies in `pubspec.yaml`:
7274
7375
```diff
74-
dependencies:
75-
flutter:
76-
sdk: flutter
76+
dependencies:
77+
flutter:
78+
sdk: flutter
7779
+ pspdfkit_flutter:
7880
+ path_provider: ^0.4.1
7981
```
@@ -92,9 +94,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
9294
9395
9. Open `lib/main.dart` and replace the entire content with the contents of [demo_project_main.dart.txt](doc/demo_project_main.dart.txt). This simple example will load a PDF document from local device filesystem.
9496
95-
10. In `lib/main.dart` replace `YOUR_LICENSE_KEY_GOES_HERE` with your PSPDFKit license key.
96-
97-
11. Add the PDF document you want to display in your project’s `assets` directory.
97+
10. Add the PDF document you want to display in your project’s `assets` directory.
9898
- First create a `PDFs` directory:
9999
100100
```bash
@@ -107,19 +107,19 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
107107
cp ~/Downloads/Document.pdf PDFs/Document.pdf
108108
```
109109
110-
12. Specify the `assets` directory in `pubspec.yaml`:
110+
11. Specify the `assets` directory in `pubspec.yaml`:
111111
112112
```diff
113-
# The following section is specific to Flutter.
114-
flutter:
113+
# The following section is specific to Flutter.
114+
flutter:
115115
+ assets:
116116
+ - PDFs/
117-
...
117+
...
118118
```
119119
120-
13. [Start your Android emulator][start-the-emulator], or connect a device.
120+
12. [Start your Android emulator][start-the-emulator], or connect a device.
121121
122-
14. Run the app with:
122+
13. Run the app with:
123123
124124
```bash
125125
flutter run
@@ -164,9 +164,9 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
164164
6. Add the PSPDFKit and `path_provider` dependencies in `pubspec.yaml`:
165165
166166
```diff
167-
dependencies:
168-
flutter:
169-
sdk: flutter
167+
dependencies:
168+
flutter:
169+
sdk: flutter
170170
+ pspdfkit_flutter:
171171
+ path_provider: ^0.4.1
172172
```
@@ -194,17 +194,15 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
194194
```diff
195195
-# platform :ios, '9.0'
196196
+platform :ios, '12.0'
197-
...
198-
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
197+
...
198+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
199199
+ pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/pspdfkit-ios/latest.podspec'
200-
end
200+
end
201201
```
202202
203203
11. Open `lib/main.dart` and replace the entire content with the contents of [demo_project_main.dart](doc/demo_project_main.dart). This simple example will load a PDF document from local device filesystem.
204204
205-
12. In `lib/main.dart` replace `YOUR_LICENSE_KEY_GOES_HERE` with your PSPDFKit license key.
206-
207-
13. Add the PDF document you want to display in your project’s `assets` directory.
205+
12. Add the PDF document you want to display in your project’s `assets` directory.
208206
- First create a `PDFs` directory:
209207
210208
```bash
@@ -217,25 +215,25 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
217215
cp ~/Downloads/Document.pdf PDFs/Document.pdf
218216
```
219217
220-
14. Specify the `assets` directory in `pubspec.yaml`:
218+
13. Specify the `assets` directory in `pubspec.yaml`:
221219
222220
```diff
223-
# The following section is specific to Flutter.
224-
flutter:
221+
# The following section is specific to Flutter.
222+
flutter:
225223
+ assets:
226224
+ - PDFs/
227-
...
225+
...
228226
```
229227
230-
15. Run `flutter emulators --launch apple_ios_simulator` to launch the iOS Simulator.
228+
14. Run `flutter emulators --launch apple_ios_simulator` to launch the iOS Simulator.
231229
232-
16. Run the app with:
230+
15. Run the app with:
233231
234232
```bash
235233
flutter run
236234
```
237235
238-
# Example
236+
# Example App
239237
240238
To see PSPDFKit Flutter in action check out our [Flutter example app](example/).
241239
@@ -245,6 +243,15 @@ Showing a PDF document inside your Flutter app is as simple as this:
245243
Pspdfkit.present('file:///path/to/Document.pdf');
246244
```
247245
246+
# Upgrading to a Full PSPDFKit License Key
247+
248+
PSPDFKit is a commercial product and requires the purchase of a license key when used in production. By default, this library will
249+
initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
250+
251+
To purchase a license for production use, please reach out to us via https://pspdfkit.com/sales/form/.
252+
253+
To initialize PSPDFKit using a license key, call `Pspdfkit.setLicenseKey("...")` before using any other PSPDFKit APIs or features.
254+
248255
# Contributing
249256
250257
Please ensure [you signed our CLA](https://pspdfkit.com/guides/web/current/miscellaneous/contributing/) so we can accept your contributions.
@@ -279,8 +286,8 @@ FAILURE: Build failed with an exception.
279286
A: If you were using version [1.10.3](https://github.com/PSPDFKit/pspdfkit-flutter/releases/tag/1.10.3) or earlier, you will need to update the imports in your Dart files like so:
280287
281288
```diff
282-
- import 'package:pspdfkit_flutter/pspdfkit.dart';
283-
+ import 'package:pspdfkit_flutter/src/main.dart';
289+
-import 'package:pspdfkit_flutter/pspdfkit.dart';
290+
+import 'package:pspdfkit_flutter/src/main.dart';
284291
```
285292
286293
# Troubleshooting

android/config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (pspdfkitMavenUrl == null || pspdfkitMavenUrl == '') {
3838

3939
ext.pspdfkitVersion = localProperties.getProperty('pspdfkit.version')
4040
if (pspdfkitVersion == null || pspdfkitVersion == '') {
41-
ext.pspdfkitVersion = '6.6.0'
41+
ext.pspdfkitVersion = '6.6.2'
4242
}
4343

4444
ext.pspdfkitMavenModuleName = 'pspdfkit'

doc/demo_project_main.dart.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class _MyAppState extends State<MyApp> {
3030
}
3131

3232
void initPlatformState() async {
33-
await Pspdfkit.setLicenseKey('YOUR_LICENSE_KEY_GOES_HERE');
33+
// By default, this example doesn't set a license key, but instead runs in trial mode (which is the default, and which requires no
34+
// specific initialization). If you want to use a different license key for evaluation (e.g. a production license), you can uncomment
35+
// the next line and set the license key.
36+
// await Pspdfkit.setLicenseKey('YOUR_LICENSE_KEY_GOES_HERE');
3437
}
3538

3639
void showDocument(BuildContext context) async {

example/lib/main.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import 'pspdfkit_instantjson_example.dart';
2424
import 'pspdfkit_annotations_example.dart';
2525
import 'pspdfkit_annotation_processing_example.dart';
2626

27-
const String PSPDFKIT_LICENSE_KEY = 'LICENSE_KEY_GOES_HERE';
28-
2927
const String _documentPath = 'PDFs/PSPDFKit.pdf';
3028
const String _lockedDocumentPath = 'PDFs/protected.pdf';
3129
const String _imagePath = 'PDFs/PSPDFKit_Image_Example.jpg';
@@ -625,7 +623,10 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
625623
_frameworkVersion = frameworkVersion ?? '';
626624
});
627625

628-
await Pspdfkit.setLicenseKey(PSPDFKIT_LICENSE_KEY);
626+
// By default, this example doesn't set a license key, but instead runs in trial mode (which is the default, and which requires no
627+
// specific initialization). If you want to use a different license key for evaluation (e.g. a production license), you can uncomment
628+
// the next line and set the license key.
629+
// await Pspdfkit.setLicenseKey("YOUR_LICENSE_KEY_GOES_HERE");
629630
}
630631

631632
void flutterPdfActivityOnPauseHandler() {

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pspdfkit_example
22
description: Demonstrates how to use the pspdfkit plugin.
3-
version: 2.2.1
3+
version: 2.3.0
44
author: PSPDFKit
55
homepage: https://pspdfkit.com/
66
environment:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pspdfkit_flutter
22
description: A Flutter plugin providing a feature-rich PDF viewing and editing experience to your users with the powerful PSPDFKit PDF SDK.
3-
version: 2.2.2
3+
version: 2.3.0
44
homepage: https://pspdfkit.com/
55
repository: https://github.com/PSPDFKit/pspdfkit-flutter
66
issue_tracker: https://github.com/PSPDFKit/pspdfkit-flutter/issues

0 commit comments

Comments
 (0)