Skip to content

Commit 563a41e

Browse files
committed
Release 4.3.1
1 parent d6d664c commit 563a41e

8 files changed

Lines changed: 59 additions & 55 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.3.1 — 22 Apr 2026
2+
3+
- Fixes a crash when setting the `toolbarPosition` without the Document Editor component in the Nutrient license. (J#HYB-991)
4+
15
## 4.3.0 — 17 Mar 2026
26

37
- Adds the `onShouldExecuteAction` callback and `executeAction` API to `NutrientView` to control whether an annotation action should execute. (J#HYB-926)

ios/RCTPSPDFKitView.m

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,52 +1139,52 @@ - (void)postProcessConfigurationOptionsWithJSON:(id)json forPDFViewController:(P
11391139
controller.documentInfoCoordinator.availableControllerOptions = [availableControllerOptions copy];
11401140
}
11411141

1142-
// Apply toolbar position configuration
1143-
if ([dictionary objectForKey:@"toolbarPosition"] || [dictionary objectForKey:@"supportedToolbarPositions"]) {
1144-
// Helper function to convert position string to enum
1145-
PSPDFFlexibleToolbarPosition (^convertPositionString)(NSString *) = ^PSPDFFlexibleToolbarPosition(NSString *positionString) {
1146-
if ([positionString isEqualToString:@"top"]) {
1147-
return PSPDFFlexibleToolbarPositionTop;
1148-
} else if ([positionString isEqualToString:@"left"]) {
1149-
return PSPDFFlexibleToolbarPositionLeft;
1150-
} else if ([positionString isEqualToString:@"right"]) {
1151-
return PSPDFFlexibleToolbarPositionRight;
1152-
}
1153-
return PSPDFFlexibleToolbarPositionTop;
1154-
};
1155-
1156-
// Helper function to apply toolbar position configuration
1157-
void (^applyToolbarPosition)(PSPDFFlexibleToolbar *) = ^(PSPDFFlexibleToolbar *toolbar) {
1158-
if (toolbar != nil) {
1159-
// Set supported toolbar positions
1160-
if ([dictionary objectForKey:@"supportedToolbarPositions"]) {
1161-
NSArray<NSString *> *positions = [dictionary objectForKey:@"supportedToolbarPositions"];
1162-
PSPDFFlexibleToolbarPosition supportedPositions = 0;
1163-
for (NSString *positionString in positions) {
1164-
supportedPositions |= convertPositionString(positionString);
1165-
}
1166-
toolbar.supportedToolbarPositions = supportedPositions;
1167-
}
1168-
1169-
// Set toolbar position
1170-
if ([dictionary objectForKey:@"toolbarPosition"]) {
1171-
NSString *positionString = [dictionary objectForKey:@"toolbarPosition"];
1172-
toolbar.toolbarPosition = convertPositionString(positionString);
1173-
}
1174-
}
1175-
};
1176-
1177-
// Apply to annotation toolbar
1178-
PSPDFAnnotationToolbar *annotationToolbar = controller.annotationToolbarController.annotationToolbar;
1179-
applyToolbarPosition(annotationToolbar);
1180-
1181-
// Apply to document editor toolbar
1182-
if (controller.documentEditorController != nil &&
1183-
controller.documentEditorController.toolbarController != nil) {
1184-
PSPDFFlexibleToolbar *documentEditorToolbar = controller.documentEditorController.toolbarController.documentEditorToolbar;
1185-
applyToolbarPosition(documentEditorToolbar);
1186-
}
1187-
}
1142+
// Apply toolbar position configuration
1143+
if ([dictionary objectForKey:@"toolbarPosition"] || [dictionary objectForKey:@"supportedToolbarPositions"]) {
1144+
// Helper function to convert position string to enum
1145+
PSPDFFlexibleToolbarPosition (^convertPositionString)(NSString *) = ^PSPDFFlexibleToolbarPosition(NSString *positionString) {
1146+
if ([positionString isEqualToString:@"top"]) {
1147+
return PSPDFFlexibleToolbarPositionTop;
1148+
} else if ([positionString isEqualToString:@"left"]) {
1149+
return PSPDFFlexibleToolbarPositionLeft;
1150+
} else if ([positionString isEqualToString:@"right"]) {
1151+
return PSPDFFlexibleToolbarPositionRight;
1152+
}
1153+
return PSPDFFlexibleToolbarPositionTop;
1154+
};
1155+
1156+
// Helper function to apply toolbar position configuration
1157+
void (^applyToolbarPosition)(PSPDFFlexibleToolbar *) = ^(PSPDFFlexibleToolbar *toolbar) {
1158+
if (toolbar != nil) {
1159+
// Set supported toolbar positions
1160+
if ([dictionary objectForKey:@"supportedToolbarPositions"]) {
1161+
NSArray<NSString *> *positions = [dictionary objectForKey:@"supportedToolbarPositions"];
1162+
PSPDFFlexibleToolbarPosition supportedPositions = 0;
1163+
for (NSString *positionString in positions) {
1164+
supportedPositions |= convertPositionString(positionString);
1165+
}
1166+
toolbar.supportedToolbarPositions = supportedPositions;
1167+
}
1168+
1169+
// Set toolbar position
1170+
if ([dictionary objectForKey:@"toolbarPosition"]) {
1171+
NSString *positionString = [dictionary objectForKey:@"toolbarPosition"];
1172+
toolbar.toolbarPosition = convertPositionString(positionString);
1173+
}
1174+
}
1175+
};
1176+
1177+
if ([PSPDFKitGlobal isFeatureEnabled:PSPDFFeatureMaskAnnotationEditing]) {
1178+
PSPDFAnnotationToolbar *annotationToolbar = controller.annotationToolbarController.annotationToolbar;
1179+
applyToolbarPosition(annotationToolbar);
1180+
}
1181+
1182+
if ([PSPDFKitGlobal isFeatureEnabled:PSPDFFeatureMaskDocumentEditing] &&
1183+
controller.documentEditorController.toolbarController != nil) {
1184+
PSPDFFlexibleToolbar *documentEditorToolbar = controller.documentEditorController.toolbarController.documentEditorToolbar;
1185+
applyToolbarPosition(documentEditorToolbar);
1186+
}
1187+
}
11881188
}
11891189
}
11901190

lib/configuration/PDFConfiguration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ exports.PDFConfiguration = void 0;
107107
* @property { PDFConfiguration.IOSFileConflictResolution } [iOSFileConflictResolution] Resolution options for conflicts due to out of process file changes or deletion.
108108
* @property { PDFConfiguration.IOSDocumentInfoOption[] } [iOSDocumentInfoOptions] Choose which document-related information to display in the document info controller.
109109
* @property { PDFConfiguration.BooleanType } [androidEnableStylusOnDetection] Indicates whether we should automatically detect the stylus. Enabling this will automatically disable all other inputs once we detect stylus use. Defaults to true.
110-
* @property { PDFConfiguration.ToolbarPosition } [toolbarPosition] Sets the position of the annotation toolbar.
111-
* @property { PDFConfiguration.ToolbarPosition[] } [supportedToolbarPositions] Sets the available positions for the annotation toolbar.
110+
* @property { PDFConfiguration.ToolbarPosition } [toolbarPosition] Sets the position of the annotation and document editing toolbars.
111+
* @property { PDFConfiguration.ToolbarPosition[] } [supportedToolbarPositions] Sets the available positions for the annotation and document editing toolbars.
112112
*/
113113
var PDFConfiguration = /** @class */ (function () {
114114
function PDFConfiguration() {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nutrient-sdk/react-native",
3-
"version": "4.3.0",
3+
"version": "4.3.1",
44
"description": "Nutrient React Native SDK",
55
"keywords": [
66
"react native",

samples/Catalog/examples/NutrientViewComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { Alert, processColor, Text, TouchableOpacity, View } from 'react-native';
33
import NutrientView, { PDFConfiguration } from '@nutrient-sdk/react-native';
4-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
54

65
import { exampleDocumentPath, pspdfkitColor } from '../configuration/Constants';
76
import { BaseExampleAutoHidingHeaderComponent } from '../helpers/BaseExampleAutoHidingHeaderComponent';
@@ -33,6 +32,7 @@ export class NutrientViewComponent extends BaseExampleAutoHidingHeaderComponent
3332
iOSUseParentNavigationBar: false,
3433
iOSDocumentInfoOptions: [PDFConfiguration.IOSDocumentInfoOption.OUTLINE, PDFConfiguration.IOSDocumentInfoOption.ANNOTATIONS],
3534
androidEnableStylusOnDetection: false,
35+
toolbarPosition: PDFConfiguration.ToolbarPosition.TOP,
3636
}}
3737
onReady={() => {
3838
console.log('NutrientView is ready');

samples/Catalog/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PODS:
99
- hermes-engine/Pre-built (= 0.14.0)
1010
- hermes-engine/Pre-built (0.14.0)
1111
- Instant (26.6.0)
12-
- nutrient-sdk-react-native (4.3.0):
12+
- nutrient-sdk-react-native (4.3.1):
1313
- boost
1414
- DoubleConversion
1515
- fast_float
@@ -2961,7 +2961,7 @@ SPEC CHECKSUMS:
29612961
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
29622962
hermes-engine: 949f245610ade3c3701f96b679119dee1869e1b5
29632963
Instant: 95db4686c0be5e2953d8a80184ce4f239bcda5e5
2964-
nutrient-sdk-react-native: 2f3d8f87e3dfbe88e3cc9b802e33ea2382fc0fc3
2964+
nutrient-sdk-react-native: 9bf46c30836ff38f74bbb28ad69512bf83ee868f
29652965
PSPDFKit: 8b63d55bf7df1947f9b20319703f7153550b81b3
29662966
RCT-Folly: 59ec0ac1f2f39672a0c6e6cecdd39383b764646f
29672967
RCTDeprecation: a41bbdd9af30bf2e5715796b313e44ec43eefff1

samples/Catalog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "catalog",
3-
"version": "4.3.0",
3+
"version": "4.3.1",
44
"private": true,
55
"scripts": {
66
"android": "npx react-native run-android",

src/configuration/PDFConfiguration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ import { AIAssistantConfiguration } from './AIAssistantConfiguration';
107107
* @property { PDFConfiguration.IOSFileConflictResolution } [iOSFileConflictResolution] Resolution options for conflicts due to out of process file changes or deletion.
108108
* @property { PDFConfiguration.IOSDocumentInfoOption[] } [iOSDocumentInfoOptions] Choose which document-related information to display in the document info controller.
109109
* @property { PDFConfiguration.BooleanType } [androidEnableStylusOnDetection] Indicates whether we should automatically detect the stylus. Enabling this will automatically disable all other inputs once we detect stylus use. Defaults to true.
110-
* @property { PDFConfiguration.ToolbarPosition } [toolbarPosition] Sets the position of the annotation toolbar.
111-
* @property { PDFConfiguration.ToolbarPosition[] } [supportedToolbarPositions] Sets the available positions for the annotation toolbar.
110+
* @property { PDFConfiguration.ToolbarPosition } [toolbarPosition] Sets the position of the annotation and document editing toolbars.
111+
* @property { PDFConfiguration.ToolbarPosition[] } [supportedToolbarPositions] Sets the available positions for the annotation and document editing toolbars.
112112
*/
113113

114114
export class PDFConfiguration {

0 commit comments

Comments
 (0)