Skip to content

Commit 7e28d95

Browse files
author
PSPDFKit
committed
Release 3.6.0
1 parent f6a1a53 commit 7e28d95

File tree

87 files changed

+1481
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1481
-545
lines changed

ACKNOWLEDGEMENTS.md

Lines changed: 613 additions & 387 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
## Newest Release
22

3+
### 3.6.0 - 08 May 2023
4+
- Adds measurement tools. (#39806)
5+
- Updates for PSPDFKit 8.6.0 for Android. (#39501)
6+
- Updates for PSPDFKit 12.2 for iOS. (#39995)
7+
8+
## Previous Releases
9+
310
### 3.5.1 - 15 Mar 2023
411
- Updates iOS license initialization in the example catalog. (#38999)
512
- Updates Instant web demo links. (#39018)
613
- Updates for PSPDFKit 8.5.1 for Android. (#39090)
714
- Updates for PSPDFKit 12.1.2 for iOS. (#39090)
815

9-
## Previous Releases
10-
1116
### 3.5.0 - 17 Jan 2023
1217
- Adds Instant Synchronization support. (#37675)
1318
- Updates for PSPDFKit 8.5 for Android. (#38136)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
All items and source code Copyright © 2010-2022 PSPDFKit GmbH.
1+
All items and source code Copyright © 2010-2023 PSPDFKit GmbH.
22

33
PSPDFKit is a commercial product and requires a license to be used.
44

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright © 2019-2022 PSPDFKit GmbH. All rights reserved.
1+
# Copyright © 2019-2023 PSPDFKit GmbH. All rights reserved.
22
#
33
# THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
44
# AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.

android/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved.
33
*
44
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
55
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -37,10 +37,10 @@ apply plugin: 'kotlin-android'
3737

3838
android {
3939
compileSdkVersion androidCompileSdkVersion
40-
40+
4141
compileOptions {
42-
sourceCompatibility 1.8
43-
targetCompatibility 1.8
42+
sourceCompatibility JavaVersion.VERSION_1_8
43+
targetCompatibility JavaVersion.VERSION_1_8
4444
}
4545

4646
defaultConfig {
@@ -57,5 +57,4 @@ dependencies {
5757
implementation "com.pspdfkit:$pspdfkitMavenModuleName:$pspdfkitVersion"
5858
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
5959
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
60-
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
6160
}

android/config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved.
33
*
44
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
55
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -38,7 +38,7 @@ if (pspdfkitMavenUrl == null || pspdfkitMavenUrl == '') {
3838

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

4444
ext.pspdfkitMavenModuleName = 'pspdfkit'
@@ -56,4 +56,4 @@ ext.androidCompileSdkVersion = 33
5656
ext.androidMinSdkVersion = 21
5757
ext.androidTargetSdkVersion = 33
5858
ext.androidGradlePluginVersion = '7.4.2'
59-
ext.kotlinVersion = "1.8.0"
59+
ext.kotlinVersion = "1.8.10"

android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved.
33
*
44
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
55
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.

android/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
~ Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved.
2+
~ Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved.
33
~
44
~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
55
~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -14,7 +14,7 @@
1414

1515
<application android:largeHeap="true">
1616
<activity
17-
android:name=".FlutterPdfActivity"
17+
android:name="com.pspdfkit.flutter.pspdfkit.FlutterPdfActivity"
1818
android:windowSoftInputMode="adjustNothing" />
1919
</application>
2020
</manifest>

android/src/main/java/com/pspdfkit/flutter/pspdfkit/ConfigurationAdapter.java

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2018-2022 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2018-2023 PSPDFKit GmbH. All rights reserved.
33
*
44
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
55
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -29,6 +29,7 @@
2929
import com.pspdfkit.configuration.settings.SettingsMenuItemType;
3030
import com.pspdfkit.configuration.sharing.ShareFeatures;
3131
import com.pspdfkit.configuration.theming.ThemeMode;
32+
import com.pspdfkit.preferences.PSPDFKitPreferences;
3233
import com.pspdfkit.ui.special_mode.controller.AnnotationTool;
3334

3435
import java.util.ArrayList;
@@ -181,6 +182,12 @@ class ConfigurationAdapter {
181182
// Instant Options
182183
private static final String ENABLE_INSTANT_COMMENTS = "enableInstantComments";
183184

185+
// Measurement tools options
186+
private static final String ENABLED_MEASUREMENT_TOOLS = "enableMeasurementTools";
187+
private static final String ENABLE_MAGNIFIER = "enableMagnifier";
188+
private static final String ENABLED_MEASUREMENT_TOOL_SNAPPING = "enableMeasurementToolSnapping";
189+
190+
184191
@NonNull
185192
private final PdfActivityConfiguration.Builder configuration;
186193
@Nullable
@@ -363,9 +370,25 @@ class ConfigurationAdapter {
363370
if (key != null) {
364371
enableInstantComments = (boolean) configurationMap.get(key);
365372
}
373+
374+
key = getKeyOfType(configurationMap, ENABLE_MAGNIFIER, Boolean.class);
375+
if (key != null) {
376+
configureMagnifierEnabled((Boolean) configurationMap.get(key));
377+
}
378+
379+
key = getKeyOfType(configurationMap, ENABLED_MEASUREMENT_TOOLS, Boolean.class);
380+
if (key != null) {
381+
configureMeasurementToolsEnabled((Boolean) configurationMap.get(key));
382+
}
383+
384+
key = getKeyOfType(configurationMap, ENABLED_MEASUREMENT_TOOL_SNAPPING, Boolean.class);
385+
if (key != null) {
386+
configureMeasurementToolSnappingEnabled(context,(Boolean) configurationMap.get(key));
387+
}
366388
}
367389
}
368390

391+
369392
private void configurePageTransition(@NonNull final String transition) {
370393
switch (transition) {
371394
case PAGE_TRANSITION_SCROLL_PER_SPREAD:
@@ -711,6 +734,18 @@ private void configureAutosaveEnabled(boolean autosaveEnabled) {
711734
configuration.autosaveEnabled(autosaveEnabled);
712735
}
713736

737+
private void configureMeasurementToolsEnabled(Boolean aBoolean) {
738+
configuration.setMeasurementToolsEnabled(aBoolean);
739+
}
740+
741+
private void configureMagnifierEnabled(Boolean aBoolean) {
742+
configuration.enableMagnifier(aBoolean);
743+
}
744+
745+
private void configureMeasurementToolSnappingEnabled(Context context,Boolean aBoolean) {
746+
PSPDFKitPreferences.get(context).setMeasurementSnappingEnabled(aBoolean);
747+
}
748+
714749
private <T> boolean containsKeyOfType(@NonNull HashMap<String, Object> configurationMap,
715750
@NonNull String key,
716751
@NonNull Class<T> clazz) {

android/src/main/java/com/pspdfkit/flutter/pspdfkit/EventDispatcher.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///
2-
/// Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
2+
/// Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
33
///
44
/// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
55
/// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -12,6 +12,10 @@
1212
import androidx.annotation.NonNull;
1313
import androidx.annotation.Nullable;
1414

15+
import com.pspdfkit.document.PdfDocument;
16+
17+
import org.jetbrains.annotations.NotNull;
18+
1519
import java.util.HashMap;
1620

1721
import io.flutter.plugin.common.MethodChannel;
@@ -48,6 +52,8 @@ public void notifyActivityOnPause() {
4852
sendEvent("flutterPdfActivityOnPause");
4953
}
5054

55+
56+
5157
public void notifyInstantSyncStarted(String documentId) {
5258
sendEvent("pspdfkitInstantSyncStarted", documentId);
5359
}
@@ -86,4 +92,8 @@ private void sendEvent(@NonNull final String method, @Nullable final Object argu
8692
channel.invokeMethod(method, arguments, null);
8793
}
8894
}
95+
96+
public void notifyDocumentLoaded(@NotNull PdfDocument document) {
97+
sendEvent("pspdfkitDocumentLoaded", document.getUid());
98+
}
8999
}

0 commit comments

Comments
 (0)