Skip to content

Commit 7430a7e

Browse files
committed
2.5.1
1 parent a2366c7 commit 7430a7e

File tree

18 files changed

+208
-4637
lines changed

18 files changed

+208
-4637
lines changed

CHANGELOG.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
## Newest Release
22

3+
### 2.5.1 - 03 Nov. 2025
4+
5+
New Features
6+
7+
1. Added the features support for ComPDFKit PDF SDK for iOS V2.5.1.
8+
2. Added the features support for ComPDFKit PDF SDK for Android V2.5.1.
9+
3. Adapted to Androidx Material version 1.13.0
10+
4. Added API for page rotation
11+
5. Android: Fixed crash issue when searching text containing special characters
12+
13+
## Previous Release
14+
315
### 2.5.0 - 23 Oct. 2025
16+
417
New Features
18+
519
1. Added the features support for ComPDFKit PDF SDK for iOS V2.5.0.
620
2. Added the features support for ComPDFKit PDF SDK for Android V2.5.0.
721
3. Added Spanish language support.
@@ -24,19 +38,19 @@ New Features
2438
20. Added Pencil annotation toolbar configuration on iOS
2539

2640
Issues Addressed
41+
2742
1. Fixed crash on Android caused by empty arrays in shape annotation properties
2843
2. Fixed issue where FreeText input was not properly centered on Android
2944
3. Fixed inconsistency between FreeText font size and the configured value on Android
3045
4. Fixed an issue where some documents crashed when opened on Android.
3146
5. Fixed an issue where content edits were not saved correctly on Android.
32-
6. Fixed issue where imported FreeText annotations might not display on iOS
47+
6. Fixed issue where imported FreeText annotations might not display on iOS
3348
7. Fixed issue where the watermark toolbar would not appear when the top toolbar was hidden on iOS
3449

35-
36-
## Previous Release
37-
3850
### 2.4.7 - 12 Sep. 2025
51+
3952
New Features
53+
4054
1. Added the features support for ComPDFKit PDF SDK for iOS V2.4.7.
4155
2. Added the features support for ComPDFKit PDF SDK for Android V2.4.7.
4256
3. Automatically hide the quick scroll bar when the document contains only one page.
@@ -45,8 +59,8 @@ New Features
4559
6. Fixed a potential crash when modifying properties of circle and line annotations on the Android platform.
4660
7. Fixed an issue where some documents failed to correctly trigger callbacks for the first or last page.
4761

48-
4962
### 2.4.6 - 29 Aug. 2025
63+
5064
1. Updated iOS ComPDFKit PDF SDK to version 2.4.6.
5165
2. Updated Android ComPDFKit PDF SDK to version 2.4.6.
5266
3. Added compatibility for Android 15 and Android 16.
@@ -76,7 +90,6 @@ New Features
7690

7791
1. Fixed the “Super expression must either be null or a function” error caused by incorrect class inheritance when using the Hermes engine.
7892

79-
8093
### 2.4.3 - 26 Jun. 2025
8194

8295
1. Added the features support for ComPDFKit PDF SDK for iOS V2.4.3.
@@ -87,8 +100,6 @@ New Features
87100
6. Optimized the flickering issue when jumping to a specific page
88101
7. Improved the page navigation logic during annotation undo and redo operations
89102

90-
91-
92103
### 2.4.1 - 19 Jun. 2025
93104

94105
1. Added the features support for ComPDFKit PDF SDK for iOS V2.4.1.

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
For more information, please visit our [developer guides](https://www.compdf.com/guides/pdf-sdk/react-native/requirements).
88

9-
109
## Contents
1110

1211
- [Prerequisites](#prerequisites)
@@ -25,7 +24,6 @@ ComPDF offers a [30-day free trial license](https://www.compdf.com/pricing) for
2524

2625
If you require advanced PDF features beyond the free trial license, please [contact us](https://www.compdf.com/contact-sales) to obtain a commercial license.
2726

28-
2927
### Download the PDF SDK
3028

3129
Download the ComPDFKit ReactNative PDF SDK from [Github](https://github.com/ComPDFKit/compdfkit-pdf-sdk-android) or [NPM](https://www.npmjs.com/package/@compdfkit_pdf_sdk/react_native).
@@ -152,8 +150,8 @@ open ios/Podfile
152150
```diff
153151
target 'MyApp' do
154152
# ...
155-
+ pod "ComPDFKit", podspec:'https://file.compdf.com/cocoapods/ios/compdfkit_pdf_sdk/2.5.0/ComPDFKit.podspec'
156-
+ pod "ComPDFKit_Tools", podspec:'https://file.compdf.com/cocoapods/ios/compdfkit_pdf_sdk/2.5.0/ComPDFKit_Tools.podspec'
153+
+ pod "ComPDFKit", podspec:'https://file.compdf.com/cocoapods/ios/compdfkit_pdf_sdk/2.5.1/ComPDFKit.podspec'
154+
+ pod "ComPDFKit_Tools", podspec:'https://file.compdf.com/cocoapods/ios/compdfkit_pdf_sdk/2.5.1/ComPDFKit_Tools.podspec'
157155
# ...
158156
end
159157
```
@@ -163,8 +161,8 @@ end
163161
```diff
164162
target 'MyApp' do
165163
# ...
166-
+ pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.0'
167-
+ pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.0'
164+
+ pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.1'
165+
+ pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.1'
168166
# ...
169167
end
170168
```
@@ -214,7 +212,7 @@ ComPDFKit PDF SDK currently supports two authentication methods to verify licens
214212

215213
*Learn about:*
216214

217-
*[What is the authentication mechanism of ComPDFKit's license?](https://www.compdf.com/faq/authentication-mechanism-of-compdfkit-license)*
215+
*[What is the authentication mechanism of ComPDFKit's license?](https://www.compdf.com/faq/authentication-mechanism-of-compdfkit-license)*
218216

219217
*[What are the differences between Online Authentication and Offline Authentication?](https://www.compdf.com/faq/the-differences-between-online-authentication-and-offline-authentication)*
220218

@@ -223,7 +221,6 @@ Accurately obtaining the license key is crucial for the application of the licen
223221
**Android**
224222

225223
1. In the email you received, locate the `XML` file containing the license key.
226-
227224
2. Copy the `license_key_rn.xml` file into the following directory:`android/app/src/main/assets/`
228225

229226
<img src="./screenshots/guides_rn_2.4_1.png" style="zoom:50%;" />
@@ -236,7 +233,7 @@ ComPDFKit.initWithPath('assets://license_key_rn.xml');
236233

237234
**iOS**
238235

239-
1. Use Xcode to copy the `license_key_rn.xml`file into your project’s` ios/`directory.
236+
1. Use Xcode to copy the `license_key_rn.xml`file into your project’s ` ios/`directory.
240237

241238
<img src="./screenshots/guides_rn_2.4_2.png" style="zoom:50%;" />
242239

@@ -256,8 +253,6 @@ You can also store the License file in the device’s local storage and initiali
256253
ComPDFKit.initWithPath('/data/data/0/your_packages/files/license_key_rn.xml');
257254
```
258255

259-
260-
261256
## Usage-Example
262257

263258
After installing from NPM or GitHub, replace `App.tsx` with the following code.

android/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,16 @@ android {
7676
repositories {
7777
mavenCentral()
7878
google()
79+
maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
80+
7981
}
8082

8183

8284
dependencies {
8385
compileOnly fileTree(include: ['*.jar','*.aar'], dir: 'libs')
8486
implementation "com.facebook.react:react-native:+"
8587

86-
api "com.compdf:compdfkit-tools:2.5.0"
88+
api "com.compdf:compdfkit-tools:2.5.1"
8789
api 'com.github.bumptech.glide:glide:4.15.1'
8890
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
8991
api 'androidx.documentfile:documentfile:1.0.1'

android/src/main/java/com/compdfkitpdf/reactnative/modules/CPDFViewModule.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,4 +814,18 @@ public void saveCurrentInk(int tag, Promise promise){
814814
});
815815
}
816816

817+
@ReactMethod
818+
public void setPageRotation(int tag, int pageIndex, int rotation, Promise promise){
819+
getReactApplicationContext().runOnUiQueueThread(()->{
820+
mPDFViewInstance.setPageRotation(tag, pageIndex, rotation, promise);
821+
});
822+
}
823+
824+
@ReactMethod
825+
public void getPageRotation(int tag, int pageIndex, Promise promise){
826+
getReactApplicationContext().runOnUiQueueThread(()->{
827+
promise.resolve(mPDFViewInstance.getPageRotation(tag, pageIndex));
828+
});
829+
}
830+
817831
}

android/src/main/java/com/compdfkitpdf/reactnative/viewmanager/CPDFViewManager.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,5 +1215,29 @@ public void saveCurrentInk(int tag){
12151215
readerView.getInkDrawHelper().onSave();
12161216
}
12171217

1218+
public void setPageRotation(int tag, int pageIndex, int rotation, Promise promise){
1219+
CPDFView pdfView = mDocumentViews.get(tag);
1220+
CPDFReaderView readerView = pdfView.getCPDFReaderView();
1221+
CPDFDocument document = readerView.getPDFDocument();
1222+
CPDFPage cpdfPage = document.pageAtIndex(pageIndex);
1223+
if (cpdfPage == null) {
1224+
promise.reject("SET_PAGE_ROTATION_FAIL", "Page not found at index: " + pageIndex);
1225+
return;
1226+
}
1227+
boolean setRotationResult = cpdfPage.setRotation(rotation);
1228+
promise.resolve(setRotationResult);
1229+
}
1230+
1231+
public int getPageRotation(int tag, int pageIndex){
1232+
CPDFView pdfView = mDocumentViews.get(tag);
1233+
CPDFReaderView readerView = pdfView.getCPDFReaderView();
1234+
CPDFDocument document = readerView.getPDFDocument();
1235+
CPDFPage cpdfPage = document.pageAtIndex(pageIndex);
1236+
if (cpdfPage == null) {
1237+
return 0;
1238+
}
1239+
return cpdfPage.getRotation();
1240+
}
1241+
12181242

12191243
}

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ dependencies {
135135
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
136136
// The version of react-native is set by the React Native Gradle Plugin
137137
implementation("com.facebook.react:react-android")
138-
implementation 'com.google.android.material:material:1.8.0'
138+
implementation 'com.google.android.material:material:1.13.0'
139139
if (hermesEnabled.toBoolean()) {
140140
implementation("com.facebook.react:hermes-android")
141141
} else {

example/android/config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ ext {
33
COMPILESDK: 35,
44
MINSDK: 24,
55
TARGETSDK: 35,
6-
VERSIONCODE: 1017
6+
VERSIONCODE: 1019
77
]
88
}

example/ios/CompdfkitPdfExample.xcodeproj/project.pbxproj

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,14 @@
310310
inputFileListPaths = (
311311
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample/Pods-CompdfkitPdfExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
312312
);
313+
inputPaths = (
314+
);
313315
name = "[CP] Embed Pods Frameworks";
314316
outputFileListPaths = (
315317
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample/Pods-CompdfkitPdfExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
316318
);
319+
outputPaths = (
320+
);
317321
runOnlyForDeploymentPostprocessing = 0;
318322
shellPath = /bin/sh;
319323
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample/Pods-CompdfkitPdfExample-frameworks.sh\"\n";
@@ -371,10 +375,14 @@
371375
inputFileListPaths = (
372376
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
373377
);
378+
inputPaths = (
379+
);
374380
name = "[CP] Embed Pods Frameworks";
375381
outputFileListPaths = (
376382
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
377383
);
384+
outputPaths = (
385+
);
378386
runOnlyForDeploymentPostprocessing = 0;
379387
shellPath = /bin/sh;
380388
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests-frameworks.sh\"\n";
@@ -388,10 +396,14 @@
388396
inputFileListPaths = (
389397
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample/Pods-CompdfkitPdfExample-resources-${CONFIGURATION}-input-files.xcfilelist",
390398
);
399+
inputPaths = (
400+
);
391401
name = "[CP] Copy Pods Resources";
392402
outputFileListPaths = (
393403
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample/Pods-CompdfkitPdfExample-resources-${CONFIGURATION}-output-files.xcfilelist",
394404
);
405+
outputPaths = (
406+
);
395407
runOnlyForDeploymentPostprocessing = 0;
396408
shellPath = /bin/sh;
397409
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample/Pods-CompdfkitPdfExample-resources.sh\"\n";
@@ -405,10 +417,14 @@
405417
inputFileListPaths = (
406418
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist",
407419
);
420+
inputPaths = (
421+
);
408422
name = "[CP] Copy Pods Resources";
409423
outputFileListPaths = (
410424
"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist",
411425
);
426+
outputPaths = (
427+
);
412428
runOnlyForDeploymentPostprocessing = 0;
413429
shellPath = /bin/sh;
414430
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests-resources.sh\"\n";
@@ -526,7 +542,7 @@
526542
"$(inherited)",
527543
"@executable_path/Frameworks",
528544
);
529-
MARKETING_VERSION = 2.5.0;
545+
MARKETING_VERSION = 2.5.1;
530546
ONLY_ACTIVE_ARCH = YES;
531547
OTHER_LDFLAGS = (
532548
"$(inherited)",
@@ -563,7 +579,7 @@
563579
"$(inherited)",
564580
"@executable_path/Frameworks",
565581
);
566-
MARKETING_VERSION = 2.5.0;
582+
MARKETING_VERSION = 2.5.1;
567583
ONLY_ACTIVE_ARCH = YES;
568584
OTHER_LDFLAGS = (
569585
"$(inherited)",
@@ -656,10 +672,7 @@
656672
"-DFOLLY_CFG_NO_COROUTINES=1",
657673
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
658674
);
659-
OTHER_LDFLAGS = (
660-
"$(inherited)",
661-
" ",
662-
);
675+
OTHER_LDFLAGS = "$(inherited) ";
663676
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
664677
SDKROOT = iphoneos;
665678
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -733,10 +746,7 @@
733746
"-DFOLLY_CFG_NO_COROUTINES=1",
734747
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
735748
);
736-
OTHER_LDFLAGS = (
737-
"$(inherited)",
738-
" ",
739-
);
749+
OTHER_LDFLAGS = "$(inherited) ";
740750
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
741751
SDKROOT = iphoneos;
742752
USE_HERMES = true;

example/ios/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ end
1616

1717
target 'CompdfkitPdfExample' do
1818
config = use_native_modules!
19-
pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.0'
20-
pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.0'
19+
pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.1'
20+
pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.5.1'
2121

2222
use_react_native!(
2323
:path => config[:reactNativePath],

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@compdfkit_pdf_sdk/react_native-example",
3-
"version": "2.5.0",
4-
"versionCode": "22",
3+
"version": "2.5.1",
4+
"versionCode": "24",
55
"private": true,
66
"scripts": {
77
"android": "react-native run-android",

0 commit comments

Comments
 (0)