Skip to content

Commit

Permalink
Release 2.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PSPDFKit committed Oct 30, 2024
1 parent 1b1cad9 commit 6592f8f
Show file tree
Hide file tree
Showing 57 changed files with 3,370 additions and 14,656 deletions.
30 changes: 30 additions & 0 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3073,6 +3073,36 @@ I, Matt McCutchen, the sole author of the original Big Integer Library, waive my
copyright to it, placing it in the public domain. The library comes with
absolutely no warranty.

--------------------------------------------------------------------------------
MIT License

Copyright (c) 2021 The fast_float authors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
## FreeType (www.freetype.org)

Expand Down
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
## Newest Release
## Newest release

### 2.14.0 - 30 Oct 2024

- Adds the ability to hide the main toolbar on Android using a combination of configuration and style properties. (J#HYB-431)
- Updates to Nutrient Android SDK 2024.6.1.
- Updates to Nutrient iOS SDK 14.1.1.
- Fixes an issue where the correct items weren't rendered when using the `menuItemGrouping` configuration property. (J#HYB-432)
- Fixes an issue where a crash occurred when using the `toolbar.toolbarMenuItems` property and `enterAnnotationCreationMode` API on Android. (J#HYB-517)
- Fixes an issue where some annotations would not be deleted on iOS when using the `removeAnnotations` API. (J#HYB-518)

## Previous releases

### 2.13.0 - 10 Sep 2024

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

## Previous Releases

### 2.12.0 - 01 Aug 2024

- Adds APIs belonging to the `PDFDocument` interface, moving them away from the global namespace. (J#HYB-406)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
All items and source code Copyright © 2010-2024 PSPDFKit GmbH.

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

See License-Evaluation.pdf if you are evaluating the demo.
Binary file modified License-Evaluation.pdf
Binary file not shown.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# React Native Library for PSPDFKit for iOS & Android (PDF SDK for React Native)
# Nutrient React Native SDK

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

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

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.
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.

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

### PSPDFKit
### Nutrient

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.
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.

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

# Support, Issues and License Questions

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

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.
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.

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

To initialize PSPDFKit using a license key, call either of the following before using any other PSPDFKit APIs or features:
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:

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

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

### Requirements

- 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.
- 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.

#### iOS

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

### Installation

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`.
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`.

### Getting Started

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:
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:

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:

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

1. Add the PSPDFKit library:
1. Add the Nutrient React Native SDK:

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

1. Add the PSPDFKit repository to download the PSPDFKit SDK:
1. Add the Nutrient repository to download the Nutrient SDK:

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

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

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.
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.

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

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

### Configuration

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.
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.

```typescript
const configuration: PDFConfiguration = {
Expand All @@ -259,15 +259,15 @@ const configuration: PDFConfiguration = {

## Updates

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.
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.

# Troubleshooting

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.
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.

## License

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

See [LICENSE](./LICENSE) for details.
4 changes: 2 additions & 2 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ arguments=--init-script /var/folders/3v/qy3ssjxs2m7d97yc60nrl2l00000gn/T/db3b08f
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
connection.project.dir=
connection.project.dir=../../../android
eclipse.preferences.version=1
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home
java.home=/Users/erhardbrand/Library/Java/JavaVirtualMachines/jdk-17.0.8.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Contains gradle configuration constants
*/
ext {
PSPDFKIT_VERSION = '2024.5.1'
PSPDFKIT_VERSION = '2024.6.1'
}

buildscript {
Expand Down
17 changes: 17 additions & 0 deletions android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.pspdfkit.annotations.AnnotationType;
import com.pspdfkit.configuration.activity.PdfActivityConfiguration;
import com.pspdfkit.configuration.activity.TabBarHidingMode;
import com.pspdfkit.configuration.activity.ThumbnailBarMode;
import com.pspdfkit.configuration.activity.UserInterfaceViewMode;
import com.pspdfkit.configuration.page.PageFitMode;
Expand Down Expand Up @@ -91,6 +92,7 @@ public class ConfigurationAdapter {
private static final String SHOW_PRINT_ACTION = "showPrintAction";
private static final String SHOW_DOCUMENT_INFO_VIEW = "showDocumentInfoView";
private static final String SHOW_SETTINGS_MENU = "showSettingsMenu";
private static final String SHOW_DEFAULT_TOOLBAR = "showDefaultToolbar";

// Thumbnail Options
private static final String SHOW_THUMBNAIL_BAR = "showThumbnailBar";
Expand Down Expand Up @@ -322,6 +324,10 @@ public ConfigurationAdapter(@NonNull final Context context, ReadableMap configur
if (key != null) {
configureMeasurementToolSnappingEnabled(context, configuration.getBoolean(key));
}
key = getKeyOrNull(configuration, SHOW_DEFAULT_TOOLBAR);
if (key != null) {
configureShowDefaultToolbar(configuration.getBoolean(key));
}
}
}

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

private void configureShowDefaultToolbar(final boolean showDefaultToolbar) {
if (showDefaultToolbar) {
// Set it back to the default, which is AUTOMATIC_HIDE_SINGLE
configuration.setTabBarHidingMode(TabBarHidingMode.AUTOMATIC_HIDE_SINGLE);
configuration.enableDefaultToolbar();
} else {
configuration.setTabBarHidingMode(TabBarHidingMode.HIDE);
configuration.disableDefaultToolbar();
}
}

public PdfActivityConfiguration build() {
return configuration.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public void setToolbar(@NonNull final PdfView view, @NonNull ReadableMap toolbar
customToolbarItems.add(item);
}
}

if (stockToolbarItems != null) {
PdfActivityConfiguration currentConfiguration = view.getConfiguration();
ToolbarMenuItemsAdapter newConfigurations = new ToolbarMenuItemsAdapter(currentConfiguration, stockToolbarItems, view.getInitialConfiguration());
Expand All @@ -211,9 +212,7 @@ public void setToolbar(@NonNull final PdfView view, @NonNull ReadableMap toolbar
view.setConfiguration(newConfigurations.build());
}
}
if (customToolbarItems != null) {
view.setCustomToolbarItems(customToolbarItems);
}
view.setAllToolbarItems(stockToolbarItems.toArrayList(), customToolbarItems);
}

@ReactProp(name = "disableDefaultActionForTappedAnnotations")
Expand Down
Loading

0 comments on commit 6592f8f

Please sign in to comment.