Skip to content

Commit 92a5e80

Browse files
author
PSPDFKit
committed
Release 2.3.1
1 parent 83d470f commit 92a5e80

File tree

10 files changed

+59
-7
lines changed

10 files changed

+59
-7
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.1] - 03 Jun 2021
2+
3+
- Updates readme example to enable running with sound null safety. (#29631)
4+
- Adds the implementation for the `save` method on iOS. (#29644)
5+
16
## [2.3.0] - 01 Jun 2021
27

38
- Removes the need of a trial key for running PSPDFKit Flutter in demo mode. (#28297)

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
7777
flutter:
7878
sdk: flutter
7979
+ pspdfkit_flutter:
80-
+ path_provider: ^0.4.1
80+
+ path_provider: ^2.0.2
8181
```
8282
8383
7. From the terminal app, run the following command to get all the packages:
@@ -168,7 +168,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
168168
flutter:
169169
sdk: flutter
170170
+ pspdfkit_flutter:
171-
+ path_provider: ^0.4.1
171+
+ path_provider: ^2.0.2
172172
```
173173
174174
7. From the terminal app, run the following command to get all the packages:
@@ -195,7 +195,11 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
195195
-# platform :ios, '9.0'
196196
+platform :ios, '12.0'
197197
...
198-
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
198+
target 'Runner' do
199+
use_frameworks!
200+
use_modular_headers!`
201+
202+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
199203
+ pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/pspdfkit-ios/latest.podspec'
200204
end
201205
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
arguments=
2+
auto.sync=false
3+
build.scans.enabled=false
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.8))
5+
connection.project.dir=
6+
eclipse.preferences.version=1
7+
gradle.user.home=
8+
java.home=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
9+
jvm.arguments=
10+
offline.mode=false
11+
override.workspace.settings=true
12+
show.console.view=true
13+
show.executions.view=true

doc/demo_project_main.dart.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class _MyAppState extends State<MyApp> {
6262
children: [
6363
ElevatedButton(
6464
child: Text('Tap to Open Document',
65-
style: themeData.textTheme.headline4.copyWith(fontSize: 21.0)),
65+
style: themeData.textTheme.headline4?.copyWith(fontSize: 21.0)),
6666
onPressed: () => showDocument(context))
6767
]));
6868
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
arguments=
2+
auto.sync=false
3+
build.scans.enabled=false
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5+
connection.project.dir=
6+
eclipse.preferences.version=1
7+
gradle.user.home=
8+
java.home=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
9+
jvm.arguments=
10+
offline.mode=false
11+
override.workspace.settings=true
12+
show.console.view=true
13+
show.executions.view=true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1

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.3.0
3+
version: 2.3.1
44
author: PSPDFKit
55
homepage: https://pspdfkit.com/
66
environment:

ios/Classes/PspdfkitFlutterHelper.m

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,20 @@
1212
@implementation PspdfkitFlutterHelper
1313

1414
+ (void)processMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result forViewController:(PSPDFViewController *)pdfViewController {
15-
if ([@"setFormFieldValue" isEqualToString:call.method]) {
15+
if ([@"save" isEqualToString:call.method]) {
16+
PSPDFDocument *document = pdfViewController.document;
17+
if (!document || !document.isValid) {
18+
result([FlutterError errorWithCode:@"" message:@"PDF document not found or is invalid." details:nil]);
19+
return;
20+
}
21+
[document saveWithOptions:nil completionHandler:^(NSError * _Nullable error, NSArray<__kindof PSPDFAnnotation *> * _Nonnull savedAnnotations) {
22+
if (error == nil) {
23+
result(@(YES));
24+
} else {
25+
result([FlutterError errorWithCode:@"" message:error.description details:nil]);
26+
}
27+
}];
28+
} else if ([@"setFormFieldValue" isEqualToString:call.method]) {
1629
NSString *value = call.arguments[@"value"];
1730
NSString *fullyQualifiedName = call.arguments[@"fullyQualifiedName"];
1831
result([PspdfkitFlutterHelper setFormFieldValue:value forFieldWithFullyQualifiedName:fullyQualifiedName forViewController:pdfViewController]);

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.3.0
3+
version: 2.3.1
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)