Skip to content

Commit 6592f8f

Browse files
author
PSPDFKit
committed
Release 2.14.0
1 parent 1b1cad9 commit 6592f8f

Some content is hidden

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

57 files changed

+3370
-14656
lines changed

Diff for: ACKNOWLEDGEMENTS.md

+30
Original file line numberDiff line numberDiff line change
@@ -3073,6 +3073,36 @@ I, Matt McCutchen, the sole author of the original Big Integer Library, waive my
30733073
copyright to it, placing it in the public domain. The library comes with
30743074
absolutely no warranty.
30753075

3076+
--------------------------------------------------------------------------------
3077+
MIT License
3078+
3079+
Copyright (c) 2021 The fast_float authors
3080+
3081+
Permission is hereby granted, free of charge, to any
3082+
person obtaining a copy of this software and associated
3083+
documentation files (the "Software"), to deal in the
3084+
Software without restriction, including without
3085+
limitation the rights to use, copy, modify, merge,
3086+
publish, distribute, sublicense, and/or sell copies of
3087+
the Software, and to permit persons to whom the Software
3088+
is furnished to do so, subject to the following
3089+
conditions:
3090+
3091+
The above copyright notice and this permission notice
3092+
shall be included in all copies or substantial portions
3093+
of the Software.
3094+
3095+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
3096+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
3097+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
3098+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
3099+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3100+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3101+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
3102+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3103+
DEALINGS IN THE SOFTWARE.
3104+
3105+
30763106
--------------------------------------------------------------------------------
30773107
## FreeType (www.freetype.org)
30783108

Diff for: CHANGELOG.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
## Newest Release
1+
## Newest release
2+
3+
### 2.14.0 - 30 Oct 2024
4+
5+
- Adds the ability to hide the main toolbar on Android using a combination of configuration and style properties. (J#HYB-431)
6+
- Updates to Nutrient Android SDK 2024.6.1.
7+
- Updates to Nutrient iOS SDK 14.1.1.
8+
- Fixes an issue where the correct items weren't rendered when using the `menuItemGrouping` configuration property. (J#HYB-432)
9+
- Fixes an issue where a crash occurred when using the `toolbar.toolbarMenuItems` property and `enterAnnotationCreationMode` API on Android. (J#HYB-517)
10+
- Fixes an issue where some annotations would not be deleted on iOS when using the `removeAnnotations` API. (J#HYB-518)
11+
12+
## Previous releases
213

314
### 2.13.0 - 10 Sep 2024
415

@@ -13,8 +24,6 @@
1324
- Fixes an issue where the `onDocumentLoadFailed` callback was not triggered when an incorrect document password was specified on Android. (J#HYB-491)
1425
- Fixes an issue where some measurement annotation presets were not applied when specified. (J#HYB-492)
1526

16-
## Previous Releases
17-
1827
### 2.12.0 - 01 Aug 2024
1928

2029
- Adds APIs belonging to the `PDFDocument` interface, moving them away from the global namespace. (J#HYB-406)

Diff for: LICENSE

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

3-
PSPDFKit is a commercial product and requires a license to be used.
3+
The Nutrient SDK is a commercial product and requires a license to be used.
44

55
See License-Evaluation.pdf if you are evaluating the demo.

Diff for: License-Evaluation.pdf

3.3 KB
Binary file not shown.

Diff for: README.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# React Native Library for PSPDFKit for iOS & Android (PDF SDK for React Native)
1+
# Nutrient React Native SDK
22

3-
![PDF SDK for React Native](https://github.com/PSPDFKit/react-native/blob/master/article-header.png?raw=true)
3+
![Nutrient React Native SDK](https://github.com/PSPDFKit/react-native/blob/master/article-header.png?raw=true)
44

5-
This library requires a valid license of PSPDFKit. Licenses are per platform.
5+
This library requires a valid license of the Nutrient SDK. Licenses are per platform.
66

7-
PSPDFKit for React Native exposes the most often used APIs from PSPDFKit. Many of our partners end up forking this repository and adding some custom code to achieve even greater integration with their products, using native code.
7+
The Nutrient React Native SDK exposes the most often used APIs from Nutrient. Many of our partners end up forking this repository and adding some custom code to achieve even greater integration with their products, using native code.
88

99
Windows is not currently supported, please use version [1.24.9](https://github.com/PSPDFKit/react-native/releases/tag/1.24.9) instead.
1010

11-
### PSPDFKit
11+
### Nutrient
1212

13-
The [PSPDFKit SDK](https://pspdfkit.com/) is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.
13+
The [Nutrient SDK](https://nutrient.io/) is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.
1414

15-
[PSPDFKit Instant](https://pspdfkit.com/instant) adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.
15+
[Nutrient Collaboration ](https://www.nutrient.io/sdk/solutions/collaboration) adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.
1616

1717
# Support, Issues and License Questions
1818

19-
PSPDFKit offers support for customers with an active SDK license via https://pspdfkit.com/support/request/
19+
Nutrient offers support for customers with an active SDK license via https://support.nutrient.io/hc/en-us/requests/new.
2020

21-
Are you evaluating our SDK? That's great, we're happy to help out! PSPDFKit is a commercial product and requires the purchase of a license key when used in production. By default, this library will initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
21+
Are you evaluating our SDK? That's great, we're happy to help out! The Nutrient React Native SDK is a commercial product and requires the purchase of a license key when used in production. By default, this library will initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
2222

23-
To purchase a license for production use, please reach out to us via https://pspdfkit.com/sales/form/.
23+
To purchase a license for production use, please reach out to us via https://www.nutrient.io/contact-sales.
2424

25-
To initialize PSPDFKit using a license key, call either of the following before using any other PSPDFKit APIs or features:
25+
To initialize the Nutrient React Native SDK using a license key, call either of the following before using any other Nutrient SDK APIs or features:
2626

2727
To set the license key for both Android and iOS, use:
2828

@@ -38,7 +38,7 @@ PSPDFKit.setLicenseKey('YOUR_REACT_NATIVE_LICENSE_KEY_GOES_HERE');
3838

3939
### Requirements
4040

41-
- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI. If you’re using Expo, [check out our blog post](https://pspdfkit.com/blog/2023/how-to-use-pspdfkit-for-react-native-with-expo/) on the topic.
41+
- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI. If you’re using Expo, [check out our blog post](https://www.nutrient.io/blog/how-to-use-pspdfkit-for-react-native-with-expo/) on the topic.
4242

4343
#### iOS
4444

@@ -53,11 +53,11 @@ PSPDFKit.setLicenseKey('YOUR_REACT_NATIVE_LICENSE_KEY_GOES_HERE');
5353

5454
### Installation
5555

56-
The PSPDFKit React Native dependency is installed from the GitHub repository and not the `npm` registry. To install the PSPDFKit React Native dependency, run `yarn add react-native-pspdfkit@github:PSPDFKit/react-native` in your project directory or `npm install github:PSPDFKit/react-native` if you’re using `npm`.
56+
The Nutrient React Native SDK dependency is installed from the GitHub repository and not the `npm` registry. To install the Nutrient React Native SDK, run `yarn add react-native-pspdfkit@github:PSPDFKit/react-native` in your project directory or `npm install github:PSPDFKit/react-native` if you’re using `npm`.
5757

5858
### Getting Started
5959

60-
See our [Getting Started on React Native guide](https://pspdfkit.com/getting-started/react-native/?react-native-platform=android-ios&project=new-project) to integrate the SDK into your new or existing application, or follow the steps below:
60+
See our [Getting Started on React Native guide](https://www.nutrient.io/getting-started/react-native/?react-native-platform=android-ios&project=new-project) to integrate the SDK into your new or existing application, or follow the steps below:
6161

6262
1. In the terminal app, change the current working directory to the location you wish to save your project. In this example, we’ll use the `~/Documents` directory:
6363

@@ -77,7 +77,7 @@ See our [Getting Started on React Native guide](https://pspdfkit.com/getting-sta
7777
cd PSPDFKitDemo
7878
```
7979

80-
1. Add the PSPDFKit library:
80+
1. Add the Nutrient React Native SDK:
8181

8282
```bash
8383
yarn add react-native-pspdfkit@github:PSPDFKit/react-native
@@ -95,7 +95,7 @@ See our [Getting Started on React Native guide](https://pspdfkit.com/getting-sta
9595
open android/build.gradle
9696
```
9797

98-
1. Add the PSPDFKit repository to download the PSPDFKit SDK:
98+
1. Add the Nutrient repository to download the Nutrient SDK:
9999

100100
```diff
101101
allprojects {
@@ -169,7 +169,7 @@ See our [Getting Started on React Native guide](https://pspdfkit.com/getting-sta
169169

170170
![view-controller-based-status-bar-appearance](./screenshots/view-controller-based-status-bar-appearance.png)
171171

172-
1. Add the PDF document you want to display to your application by dragging it into your project. On the dialog that’s displayed, select Finish to accept the default integration options. You can use <a href="https://pspdfkit.com/downloads/pspdfkit-ios-quickstart-guide.pdf" download="Document.pdf">this QuickStart Guide PDF</a> as an example.
172+
1. Add the PDF document you want to display to your application by dragging it into your project. On the dialog that’s displayed, select Finish to accept the default integration options. You can use <a href="https://www.nutrient.io/downloads/pspdfkit-ios-quickstart-guide.pdf" download="Document.pdf">this QuickStart Guide PDF</a> as an example.
173173

174174
![drag-and-drop-document](./screenshots/drag-and-drop-document.png)
175175

@@ -246,7 +246,7 @@ Take a look at the instructions to get started [here](/samples/Catalog/README.md
246246

247247
### Configuration
248248

249-
The behaviour of the `PSPDFKitView` component can be customized using the configuration object. Refer to the [`PDFConfiguration`](https://pspdfkit.com/api/react-native/PDFConfiguration.html) API documentation. The `PDFConfiguration` object can be passed as parameter in when creating the `PSPDFKitView` component, or when using the `PSPDFKit.present()` Native Module API.
249+
The behaviour of the `PSPDFKitView` component can be customized using the configuration object. Refer to the [`PDFConfiguration`](https://www.nutrient.io/api/react-native/PDFConfiguration.html) API documentation. The `PDFConfiguration` object can be passed as parameter in when creating the `PSPDFKitView` component, or when using the `PSPDFKit.present()` Native Module API.
250250

251251
```typescript
252252
const configuration: PDFConfiguration = {
@@ -259,15 +259,15 @@ const configuration: PDFConfiguration = {
259259

260260
## Updates
261261

262-
Some releases contain changes that require updates to your project settings or application code. Take a look at our [Upgrade and Migration guides](https://pspdfkit.com/guides/react-native/upgrade/) after updating your PSPDFKit for React Native dependency.
262+
Some releases contain changes that require updates to your project settings or application code. Take a look at our [Upgrade and Migration guides](https://www.nutrient.io/guides/react-native/upgrade/) after updating your Nutrient React Native SDK dependency.
263263

264264
# Troubleshooting
265265

266-
For Troubleshooting common issues you might encounter when setting up PSPDFKit for React Native, please refer to the [Troubleshooting](https://pspdfkit.com/guides/react-native/troubleshoot/) section.
266+
For Troubleshooting common issues you might encounter when setting up the Nutrient React Native SDK, please refer to the [Troubleshooting](https://www.nutrient.io/guides/react-native/troubleshoot/) section.
267267

268268
## License
269269

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

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

Diff for: android/.settings/org.eclipse.buildship.core.prefs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ arguments=--init-script /var/folders/3v/qy3ssjxs2m7d97yc60nrl2l00000gn/T/db3b08f
22
auto.sync=false
33
build.scans.enabled=false
44
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
5-
connection.project.dir=
5+
connection.project.dir=../../../android
66
eclipse.preferences.version=1
77
gradle.user.home=
8-
java.home=/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home
8+
java.home=/Users/erhardbrand/Library/Java/JavaVirtualMachines/jdk-17.0.8.jdk/Contents/Home
99
jvm.arguments=
1010
offline.mode=false
1111
override.workspace.settings=true

Diff for: android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Contains gradle configuration constants
1616
*/
1717
ext {
18-
PSPDFKIT_VERSION = '2024.5.1'
18+
PSPDFKIT_VERSION = '2024.6.1'
1919
}
2020

2121
buildscript {

Diff for: android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java

+17
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.facebook.react.bridge.ReadableMapKeySetIterator;
2525
import com.pspdfkit.annotations.AnnotationType;
2626
import com.pspdfkit.configuration.activity.PdfActivityConfiguration;
27+
import com.pspdfkit.configuration.activity.TabBarHidingMode;
2728
import com.pspdfkit.configuration.activity.ThumbnailBarMode;
2829
import com.pspdfkit.configuration.activity.UserInterfaceViewMode;
2930
import com.pspdfkit.configuration.page.PageFitMode;
@@ -91,6 +92,7 @@ public class ConfigurationAdapter {
9192
private static final String SHOW_PRINT_ACTION = "showPrintAction";
9293
private static final String SHOW_DOCUMENT_INFO_VIEW = "showDocumentInfoView";
9394
private static final String SHOW_SETTINGS_MENU = "showSettingsMenu";
95+
private static final String SHOW_DEFAULT_TOOLBAR = "showDefaultToolbar";
9496

9597
// Thumbnail Options
9698
private static final String SHOW_THUMBNAIL_BAR = "showThumbnailBar";
@@ -322,6 +324,10 @@ public ConfigurationAdapter(@NonNull final Context context, ReadableMap configur
322324
if (key != null) {
323325
configureMeasurementToolSnappingEnabled(context, configuration.getBoolean(key));
324326
}
327+
key = getKeyOrNull(configuration, SHOW_DEFAULT_TOOLBAR);
328+
if (key != null) {
329+
configureShowDefaultToolbar(configuration.getBoolean(key));
330+
}
325331
}
326332
}
327333

@@ -704,6 +710,17 @@ private void configureMeasurementToolSnappingEnabled(Context context, final Bool
704710
PSPDFKitPreferences.get(context).setMeasurementSnappingEnabled(snappingEnabled);
705711
}
706712

713+
private void configureShowDefaultToolbar(final boolean showDefaultToolbar) {
714+
if (showDefaultToolbar) {
715+
// Set it back to the default, which is AUTOMATIC_HIDE_SINGLE
716+
configuration.setTabBarHidingMode(TabBarHidingMode.AUTOMATIC_HIDE_SINGLE);
717+
configuration.enableDefaultToolbar();
718+
} else {
719+
configuration.setTabBarHidingMode(TabBarHidingMode.HIDE);
720+
configuration.disableDefaultToolbar();
721+
}
722+
}
723+
707724
public PdfActivityConfiguration build() {
708725
return configuration.build();
709726
}

Diff for: android/src/main/java/com/pspdfkit/react/ReactPdfViewManager.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public void setToolbar(@NonNull final PdfView view, @NonNull ReadableMap toolbar
201201
customToolbarItems.add(item);
202202
}
203203
}
204+
204205
if (stockToolbarItems != null) {
205206
PdfActivityConfiguration currentConfiguration = view.getConfiguration();
206207
ToolbarMenuItemsAdapter newConfigurations = new ToolbarMenuItemsAdapter(currentConfiguration, stockToolbarItems, view.getInitialConfiguration());
@@ -211,9 +212,7 @@ public void setToolbar(@NonNull final PdfView view, @NonNull ReadableMap toolbar
211212
view.setConfiguration(newConfigurations.build());
212213
}
213214
}
214-
if (customToolbarItems != null) {
215-
view.setCustomToolbarItems(customToolbarItems);
216-
}
215+
view.setAllToolbarItems(stockToolbarItems.toArrayList(), customToolbarItems);
217216
}
218217

219218
@ReactProp(name = "disableDefaultActionForTappedAnnotations")

0 commit comments

Comments
 (0)