diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md
index e5808ddb..731dab74 100644
--- a/ACKNOWLEDGEMENTS.md
+++ b/ACKNOWLEDGEMENTS.md
@@ -462,7 +462,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
-## clipper (http://www.angusj.com/delphi/clipper.php)
+## clipper2 (http://www.angusj.com/delphi/clipper.php)
Boost Software License - Version 1.0 - August 17th, 2003
@@ -488,6 +488,7 @@ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
+
--------------------------------------------------------------------------------
## cppformat (https://github.com/cppformat/cppformat)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5db35a80..a77af94e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,12 +1,18 @@
## Newest Release
+### 2.4.2 - 01 Feb 2023
+- Fixes bug issue for deleting multiple annotations (#38518)
+- Bump PSPDFKit for Android version to 8.5.0
+- Bump PSPDFKit for iOS version to 12.0.3
+- Bump minimum SDK version compileSdkVersion to API 33
+
+## Previous Releases
+
### 2.4.1 - 22 Nov 2022
- Updates for PSPDFKit 12.0.1 for iOS.
- Fixes Catalog example toolbar menu items not rendering. (#37368)
- Fixes the Annotation Processing Catalog example. (#37534)
-## Previous Releases
-
### 2.4.0 - 25 Oct 2022
- Adds PDF generation from HTML, images and template. (#36736)
diff --git a/LICENSE b/LICENSE
index a074978e..55a90bb5 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-All items and source code Copyright © 2010-2022 PSPDFKit GmbH.
+All items and source code Copyright © 2010-2023 PSPDFKit GmbH.
PSPDFKit is a commercial product and requires a license to be used.
diff --git a/README.md b/README.md
index 691e5c15..b96e4710 100644
--- a/README.md
+++ b/README.md
@@ -692,6 +692,6 @@ For Troubleshooting common issues you might encounter when setting up PSPDFKit f
## License
This project can be used for evaluation or if you have a valid PSPDFKit license.
-All items and source code Copyright © 2010-2022 PSPDFKit GmbH.
+All items and source code Copyright © 2010-2023 PSPDFKit GmbH.
See [LICENSE](./LICENSE) for details.
diff --git a/android/.classpath b/android/.classpath
index 993fef6c..4a04201c 100644
--- a/android/.classpath
+++ b/android/.classpath
@@ -1,6 +1,6 @@
-
+
diff --git a/android/build.gradle b/android/build.gradle
index 27f26111..cf034b7b 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -15,7 +15,7 @@
* Contains gradle configuration constants
*/
ext {
- PSPDFKIT_VERSION = '8.4.1'
+ PSPDFKIT_VERSION = '8.5.0'
}
buildscript {
@@ -46,7 +46,7 @@ android {
versionCode 1
versionName "1.0"
}
-
+
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 6f5cb732..88b78f67 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -4,7 +4,7 @@
~
~ PSPDFKit
~
- ~ Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ ~ Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
~
~ THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
~ AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java b/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java
index b3e517f7..72c3fbc9 100644
--- a/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java
+++ b/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/MainActivity.java b/android/src/main/java/com/pspdfkit/react/MainActivity.java
index 8c249b18..03177571 100644
--- a/android/src/main/java/com/pspdfkit/react/MainActivity.java
+++ b/android/src/main/java/com/pspdfkit/react/MainActivity.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/MainApplication.java b/android/src/main/java/com/pspdfkit/react/MainApplication.java
index 32de83c2..fab40d55 100644
--- a/android/src/main/java/com/pspdfkit/react/MainApplication.java
+++ b/android/src/main/java/com/pspdfkit/react/MainApplication.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java b/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java
index b4f38336..4a063611 100644
--- a/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java
+++ b/android/src/main/java/com/pspdfkit/react/PSPDFKitModule.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java b/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java
index 54b626ec..d02532c6 100644
--- a/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java
+++ b/android/src/main/java/com/pspdfkit/react/PSPDFKitPackage.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/RNProcessor.java b/android/src/main/java/com/pspdfkit/react/RNProcessor.java
index 600ff2d9..77755e1c 100644
--- a/android/src/main/java/com/pspdfkit/react/RNProcessor.java
+++ b/android/src/main/java/com/pspdfkit/react/RNProcessor.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2017-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2017-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java b/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java
index 4dd98a2a..53ff53b9 100644
--- a/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java
+++ b/android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -60,10 +60,11 @@ public class ReactPdfViewManager extends ViewGroupManager {
public static final int COMMAND_ADD_ANNOTATIONS = 7;
public static final int COMMAND_GET_FORM_FIELD_VALUE = 8;
public static final int COMMAND_SET_FORM_FIELD_VALUE = 9;
- public static final int COMMAND_REMOVE_ANNOTATION = 10;
public static final int COMMAND_GET_ALL_ANNOTATIONS = 11;
+ public static final int COMMAND_REMOVE_ANNOTATION = 10;
public static final int COMMAND_REMOVE_FRAGMENT = 12;
public static final int COMMAND_SET_TOOLBAR_MENU_ITEMS = 13;
+ public static final int COMMAND_REMOVE_ANNOTATIONS = 14;
private CompositeDisposable annotationDisposables = new CompositeDisposable();
@@ -106,6 +107,7 @@ public Map getCommandsMap() {
commandMap.put("getFormFieldValue", COMMAND_GET_FORM_FIELD_VALUE);
commandMap.put("setFormFieldValue", COMMAND_SET_FORM_FIELD_VALUE);
commandMap.put("removeAnnotation", COMMAND_REMOVE_ANNOTATION);
+ commandMap.put("removeAnnotations", COMMAND_REMOVE_ANNOTATIONS);
commandMap.put("getAllAnnotations", COMMAND_GET_ALL_ANNOTATIONS);
commandMap.put("removeFragment", COMMAND_REMOVE_FRAGMENT);
commandMap.put("setToolbarMenuItems", COMMAND_SET_TOOLBAR_MENU_ITEMS);
@@ -249,6 +251,17 @@ public void accept(List annotations) {
annotationDisposables.add(root.removeAnnotation(requestId, args.getMap(1)));
}
break;
+ case COMMAND_REMOVE_ANNOTATIONS:
+ if(args != null && args.size() == 2) {
+ final int requestId = args.getInt(0);
+ final ReadableArray annotations = args.getArray(1);
+ final int length = annotations.size();
+ for (int i = 0; i < length; i++) {
+ ReadableMap annotation = annotations.getMap(i);
+ annotationDisposables.add(root.removeAnnotation(requestId, annotation));
+ }
+ }
+ break;
case COMMAND_GET_ALL_UNSAVED_ANNOTATIONS:
if (args != null) {
final int requestId = args.getInt(0);
@@ -294,7 +307,7 @@ public void accept(JSONObject jsonObject) {
}
break;
case COMMAND_REMOVE_FRAGMENT:
- // Removing a fragment like this is not recommended, but it can be used as a workaround
+ // Removing a fragment like this is not recommended, but it can be used as a workaround
// to stop `react-native-screens` from crashing the App when the back button is pressed.
root.removeFragment(true);
break;
diff --git a/android/src/main/java/com/pspdfkit/react/TestingModule.java b/android/src/main/java/com/pspdfkit/react/TestingModule.java
index a4fcff7d..398186c3 100644
--- a/android/src/main/java/com/pspdfkit/react/TestingModule.java
+++ b/android/src/main/java/com/pspdfkit/react/TestingModule.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java b/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java
index 861f771a..2fe999b4 100644
--- a/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java
+++ b/android/src/main/java/com/pspdfkit/react/ToolbarMenuItemsAdapter.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2022-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java
index 7500399c..0c191004 100644
--- a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java
+++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationChangedEvent.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java
index b83ccd98..8f43df74 100644
--- a/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java
+++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewAnnotationTappedEvent.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
diff --git a/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java b/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java
index 8130af11..80fec444 100644
--- a/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java
+++ b/android/src/main/java/com/pspdfkit/react/events/PdfViewDataReturnedEvent.java
@@ -3,7 +3,7 @@
*
* PSPDFKit
*
- * Copyright © 2021-2022 PSPDFKit GmbH. All rights reserved.
+ * Copyright © 2021-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -21,6 +21,7 @@
import com.facebook.react.uimanager.events.Event;
import com.facebook.react.uimanager.events.RCTEventEmitter;
import com.pspdfkit.annotations.Annotation;
+import com.pspdfkit.annotations.AnnotationType;
import com.pspdfkit.react.helper.JsonUtilities;
import org.json.JSONException;
@@ -46,6 +47,9 @@ public PdfViewDataReturnedEvent(@IdRes int viewId, int requestId, @NonNull List<
try {
List