Skip to content

Commit 4cbfc5c

Browse files
author
PSPDFKit
committed
Release 2.16.0
1 parent 85ddc55 commit 4cbfc5c

File tree

155 files changed

+6194
-3335
lines changed

Some content is hidden

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

155 files changed

+6194
-3335
lines changed

ACKNOWLEDGEMENTS.md

+326-3
Large diffs are not rendered by default.

CHANGELOG.md

+155-136
Large diffs are not rendered by default.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
All items and source code Copyright © 2010-2024 PSPDFKit GmbH.
1+
All items and source code Copyright © 2010-2025 PSPDFKit GmbH.
22

33
The Nutrient SDK is a commercial product and requires a license to be used.
44

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ See our [Getting Started on React Native guide](https://www.nutrient.io/getting-
114114
...
115115
android {
116116
- compileSdkVersion rootProject.ext.compileSdkVersion
117-
+ compileSdkVersion 34
117+
+ compileSdkVersion 35
118118
...
119119
defaultConfig {
120120
applicationId "com.pspdfkitdemo"
@@ -139,7 +139,7 @@ See our [Getting Started on React Native guide](https://www.nutrient.io/getting-
139139
```diff
140140
...
141141
- platform :ios, min_ios_version_supported
142-
+ platform :ios, '15.0'
142+
+ platform :ios, '16.0'
143143
...
144144
```
145145

@@ -161,7 +161,7 @@ See our [Getting Started on React Native guide](https://www.nutrient.io/getting-
161161
open PSPDFKitDemo.xcworkspace
162162
```
163163

164-
1. Make sure the deployment target is set to 15.0 or higher:
164+
1. Make sure the deployment target is set to 16.0 or higher:
165165

166166
![deployment-target](./screenshots/deployment-target.png)
167167

@@ -268,6 +268,6 @@ For Troubleshooting common issues you might encounter when setting up the Nutrie
268268
## License
269269

270270
This project can be used for evaluation or if you have a valid Nutrient license.
271-
All items and source code Copyright © 2010-2024 PSPDFKit GmbH.
271+
All items and source code Copyright © 2010-2025 PSPDFKit GmbH.
272272

273273
See [LICENSE](./LICENSE) for details.

android/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
44
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
55
<classpathentry kind="output" path="bin/default"/>
66
</classpath>

android/.settings/org.eclipse.buildship.core.prefs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
55
connection.project.dir=
66
eclipse.preferences.version=1
77
gradle.user.home=
8-
java.home=/Users/erhardbrand/Library/Java/JavaVirtualMachines/jdk-17.0.8.jdk/Contents/Home
8+
java.home=/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
99
jvm.arguments=
1010
offline.mode=false
1111
override.workspace.settings=true

android/build.gradle

+39-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* PSPDFKit
55
*
6-
* Copyright © 2021-2024 PSPDFKit GmbH. All rights reserved.
6+
* Copyright © 2021-2025 PSPDFKit GmbH. All rights reserved.
77
*
88
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
99
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -15,45 +15,66 @@
1515
* Contains gradle configuration constants
1616
*/
1717
ext {
18-
PSPDFKIT_VERSION = '2024.8.1'
18+
PSPDFKIT_VERSION = '10.0.1'
1919
}
2020

2121
buildscript {
22-
ext.kotlin_version = '1.9.24'
22+
ext.kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.kotlinVersion :
23+
rootProject.ext.has('kotlin_version') ? rootProject.ext.kotlin_version :
24+
'1.9.24'
25+
26+
ext.getComposeVersion = { kotlin_version ->
27+
switch (kotlin_version) {
28+
case ~/2\..*/:
29+
// For Kotlin 2.x+, compose compiler is handled by the plugin
30+
return null
31+
case '1.9.25': return '1.5.15'
32+
case '1.9.24': return '1.5.14'
33+
default: return '1.5.14'
34+
}
35+
}
2336

2437
repositories {
2538
mavenCentral()
39+
google()
2640
maven {
2741
url 'https://maven.google.com'
2842
}
2943
maven {
30-
url 'https://customers.pspdfkit.com/maven/'
44+
url 'https://my.nutrient.io/maven/'
3145
}
3246
}
3347

3448
dependencies {
3549
classpath("com.android.tools.build:gradle:8.5.0")
3650
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
51+
// Add Compose compiler plugin for Kotlin 2.0+
52+
if (kotlin_version.startsWith('2')) {
53+
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlin_version"
54+
}
3755
}
3856
}
3957

4058
apply plugin: 'com.android.library'
4159
apply plugin: 'kotlin-android'
60+
// Add Compose compiler plugin for Kotlin 2.0+
61+
if (kotlin_version.startsWith('2')) {
62+
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
63+
}
4264

4365
android {
4466
compileSdkVersion 34
45-
buildToolsVersion "34.0.0"
4667

4768
namespace "com.pspdfkit.react"
4869

4970
defaultConfig {
50-
minSdkVersion 21
71+
minSdkVersion 24
5172
targetSdkVersion 34
5273
versionCode 1
5374
versionName "1.0"
5475
}
5576

56-
compileOptions {
77+
compileOptions {
5778
sourceCompatibility JavaVersion.VERSION_17
5879
targetCompatibility JavaVersion.VERSION_17
5980
}
@@ -68,7 +89,11 @@ android {
6889
}
6990

7091
composeOptions {
71-
kotlinCompilerExtensionVersion "1.5.14"
92+
def composeVersion = getComposeVersion(kotlin_version)
93+
if (composeVersion != null) {
94+
kotlinCompilerExtensionVersion composeVersion
95+
}
96+
// When using Kotlin 2.0+, the kotlinCompilerExtensionVersion is handled by the plugin
7297
}
7398

7499
kotlin {
@@ -77,11 +102,15 @@ android {
77102
}
78103

79104
dependencies {
80-
api("com.pspdfkit:pspdfkit:${PSPDFKIT_VERSION}") {
105+
api("io.nutrient:nutrient:${PSPDFKIT_VERSION}") {
81106
exclude group: 'com.google.auto.value', module: 'auto-value'
107+
exclude group: 'androidx.recyclerview', module: 'recyclerview'
82108
}
83-
109+
84110
implementation "com.facebook.react:react-native:+"
85111
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
86112
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
113+
implementation "androidx.compose.material:material:1.7.8"
114+
implementation "androidx.compose.material3:material3:1.3.1"
115+
implementation "androidx.recyclerview:recyclerview:1.3.2"
87116
}

android/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
~
55
~ PSPDFKit
66
~
7-
~ Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
7+
~ Copyright © 2017-2025 PSPDFKit GmbH. All rights reserved.
88
~
99
~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
1010
~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.

android/src/main/java/com/pspdfkit/react/AnnotationConfigurationAdaptor.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright © 2018-2024 PSPDFKit GmbH. All rights reserved.
2+
// Copyright © 2018-2025 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/java/com/pspdfkit/react/ConfigurationAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* PSPDFKit
55
*
6-
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
6+
* Copyright © 2017-2025 PSPDFKit GmbH. All rights reserved.
77
*
88
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
99
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.

android/src/main/java/com/pspdfkit/react/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* PSPDFKit
55
*
6-
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
6+
* Copyright © 2017-2025 PSPDFKit GmbH. All rights reserved.
77
*
88
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
99
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.

android/src/main/java/com/pspdfkit/react/MainApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* PSPDFKit
55
*
6-
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
6+
* Copyright © 2017-2025 PSPDFKit GmbH. All rights reserved.
77
*
88
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
99
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.

android/src/main/java/com/pspdfkit/react/NutrientNotificationCenter.kt

+47
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import com.facebook.react.bridge.WritableMap
88
import com.pspdfkit.PSPDFKit
99
import com.pspdfkit.analytics.AnalyticsClient
1010
import com.pspdfkit.annotations.Annotation
11+
import com.pspdfkit.annotations.AnnotationType
12+
import com.pspdfkit.annotations.WidgetAnnotation
1113
import com.pspdfkit.forms.ChoiceFormElement
1214
import com.pspdfkit.forms.ComboBoxFormElement
1315
import com.pspdfkit.forms.EditableButtonFormElement
@@ -27,6 +29,7 @@ enum class NotificationEvent(val value: String) {
2729
DOCUMENT_LOADED("documentLoaded"),
2830
DOCUMENT_LOAD_FAILED("documentLoadFailed"),
2931
DOCUMENT_PAGE_CHANGED("documentPageChanged"),
32+
DOCUMENT_SCROLLED("documentScrolled"),
3033
ANNOTATIONS_ADDED("annotationsAdded"),
3134
ANNOTATION_CHANGED("annotationChanged"),
3235
ANNOTATIONS_REMOVED("annotationsRemoved"),
@@ -87,6 +90,18 @@ object NutrientNotificationCenter {
8790
sendEvent(NotificationEvent.DOCUMENT_PAGE_CHANGED.value, jsonData)
8891
}
8992

93+
fun documentScrolled(scrollData: Map<String, Int>, documentID: String) {
94+
val jsonData = Arguments.createMap()
95+
val scrollDataMap = Arguments.createMap()
96+
scrollData.forEach { (key, value) ->
97+
scrollDataMap.putInt(key, value)
98+
}
99+
jsonData.putString("event", NotificationEvent.DOCUMENT_SCROLLED.value)
100+
jsonData.putMap("scrollData", scrollDataMap)
101+
jsonData.putString("documentID", documentID)
102+
sendEvent(NotificationEvent.DOCUMENT_SCROLLED.value, jsonData)
103+
}
104+
90105
fun annotationsChanged(changeType: String, annotation: Annotation, documentID: String) {
91106
when (changeType) {
92107
"changed" -> {
@@ -95,6 +110,10 @@ object NutrientNotificationCenter {
95110
val annotationsList = mutableListOf<Map<String, Any>>()
96111
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
97112
annotationMap["uuid"] = annotation.uuid
113+
if (annotation.type == AnnotationType.WIDGET) {
114+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
115+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
116+
}
98117
annotationsList.add(annotationMap)
99118
val nativeAnnotationsList = Arguments.makeNativeArray(annotationsList)
100119

@@ -128,6 +147,10 @@ object NutrientNotificationCenter {
128147
val annotationsList = mutableListOf<Map<String, Any>>()
129148
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
130149
annotationMap["uuid"] = annotation.uuid
150+
if (annotation.type == AnnotationType.WIDGET) {
151+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
152+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
153+
}
131154
annotationsList.add(annotationMap)
132155
val nativeAnnotationsList = Arguments.makeNativeArray(annotationsList)
133156

@@ -149,6 +172,10 @@ object NutrientNotificationCenter {
149172
val annotationsList = mutableListOf<Map<String, Any>>()
150173
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
151174
annotationMap["uuid"] = annotation.uuid
175+
if (annotation.type == AnnotationType.WIDGET) {
176+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
177+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
178+
}
152179
annotationsList.add(annotationMap)
153180
val nativeAnnotationsList = Arguments.makeNativeArray(annotationsList)
154181

@@ -168,6 +195,10 @@ object NutrientNotificationCenter {
168195
val annotationsList = mutableListOf<Map<String, Any>>()
169196
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
170197
annotationMap["uuid"] = annotation.uuid
198+
if (annotation.type == AnnotationType.WIDGET) {
199+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
200+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
201+
}
171202
annotationsList.add(annotationMap)
172203
val nativeAnnotationsList = Arguments.makeNativeArray(annotationsList)
173204

@@ -186,6 +217,10 @@ object NutrientNotificationCenter {
186217
val instantJson = JSONObject(annotation.toInstantJson())
187218
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
188219
annotationMap["uuid"] = annotation.uuid
220+
if (annotation.type == AnnotationType.WIDGET) {
221+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
222+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
223+
}
189224
val nativeAnnotationMap = Arguments.makeNativeMap(annotationMap)
190225

191226
val pointMap = mapOf("x" to pointF.x, "y" to pointF.y)
@@ -217,6 +252,10 @@ object NutrientNotificationCenter {
217252
val annotationsList = mutableListOf<Map<String, Any>>()
218253
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
219254
annotationMap["uuid"] = annotation.uuid
255+
if (annotation.type == AnnotationType.WIDGET) {
256+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
257+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
258+
}
220259

221260
(formField.formElement as? TextFormElement).let { textFormElement ->
222261
if (textFormElement != null) {
@@ -258,6 +297,10 @@ object NutrientNotificationCenter {
258297
val instantJson = JSONObject(annotation.toInstantJson())
259298
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
260299
annotationMap["uuid"] = annotation.uuid
300+
if (annotation.type == AnnotationType.WIDGET) {
301+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
302+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
303+
}
261304

262305
(formElement as? TextFormElement).let { textFormElement ->
263306
if (textFormElement != null) {
@@ -297,6 +340,10 @@ object NutrientNotificationCenter {
297340
val instantJson = JSONObject(annotation.toInstantJson())
298341
val annotationMap = JsonUtilities.jsonObjectToMap(instantJson)
299342
annotationMap["uuid"] = annotation.uuid
343+
if (annotation.type == AnnotationType.WIDGET) {
344+
val widgetAnnotation : WidgetAnnotation = annotation as WidgetAnnotation
345+
annotationMap["isRequired"] = widgetAnnotation.formElement?.isRequired
346+
}
300347

301348
(formElement as? TextFormElement).let { textFormElement ->
302349
if (textFormElement != null) {

0 commit comments

Comments
 (0)