Skip to content

Commit 79e3da5

Browse files
committed
compdfkit_flutter 1.12.0
1 parent d3d5974 commit 79e3da5

26 files changed

+1089
-2996
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 1.12.0
2+
* Added the features support for ComPDFKit PDF SDK for iOS V1.12.0.
3+
* Added the features support for ComPDFKit PDF SDK for Android V1.12.0.
4+
* Added support for finding and replacing text in content editor mode, allowing to set ignore case, whole words only, and replace all.
5+
* Added UI configuration functionality.
6+
* Added support for setting text properties when adding text in content editor mode.
7+
* Added Flatten functionality.
8+
9+
10+
## 1.11.1-dev.1
11+
* Added mode list configuration options.
12+
* Added `CPreviewMode.viewer` mode to view note annotation content
13+
14+
115
## 1.11.0
216
* Added the features support for ComPDFKit PDF SDK for Android V1.11.0.
317
* Added the features support for ComPDFKit PDF SDK for iOS V1.11.0.

README.md

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[ComPDFKit PDF SDK](https://www.compdf.com) is a robust PDF library, which offers comprehensive functions for quickly viewing, annotating, editing, and signing PDFs. It is feature-rich and battle-tested, making PDF files process and manipulation easier and faster.
66

7-
[ComPDFKit for Flutter](https://www.compdf.com/flutter) allows you to quickly add PDF functions to any Flutter application, elevating your Android and iOS apps to ensure seamless and efficient development. It is available at [pub.dev](https://pub.dev/packages/compdfkit_flutter) and GitHub.
7+
[ComPDFKit for Flutter](https://www.compdf.com/flutter) allows you to quickly add PDF functions to any Flutter application, elevating your Android and iOS apps to ensure seamless and efficient development. It is available at [pub.dev](https://pub.dev/packages/compdfkit_flutter) and [GitHub.](https://github.com/ComPDFKit/compdfkit-pdf-sdk-flutter)
88

99

1010

@@ -19,6 +19,8 @@
1919
* [ComPDFKit API](https://api.compdf.com/api/pricing) allows you to get 1000 files processing monthly now! Just [sign up](https://api.compdf.com/signup) for a free trial and enjoy comprehensive PDF functions.
2020

2121

22+
23+
2224
## Key Features
2325

2426
- [**Viewer**](https://www.compdf.com/pdf-sdk/viewer) component offers Standard page display modes, Navigation, Text search & selection, Zoom in and out & Fit-page, Text reflow, and more.
@@ -29,7 +31,7 @@
2931

3032
- [**Document Editor**](https://www.compdf.com/pdf-sdk/document-editor) component offers Split, Extract, Merge, Delete, Insert, Crop, Move, Rotate, Replace, and Exchange pages, etc.
3133

32-
- [**Content Editor**](https://www.compdf.com/pdf-sdk/edit-pdf) component offers Copy, Resize, Change Colors, Text Alignment, etc.
34+
- [**Content Editor**](https://www.compdf.com/pdf-sdk/edit-pdf) component offers Copy, Resize, Change Colors, Text Alignment, Find and Replace, etc.
3335

3436
- [**Security**](https://www.compdf.com/pdf-sdk/security) component offers Encrypt and Decrypt PDFs, Watermark, etc.
3537

@@ -57,11 +59,12 @@ Please install the following required packages:
5759

5860
Operating Environment Requirements:
5961

60-
* A minSdkVersion of `19` or higher.
62+
* A minSdkVersion of `21` or higher.
6163
* A `compileSdkVersion` of `30` or higher.
6264
* A `targetSdkVersion` of `30` or higher.
6365
* Android ABI(s): x86, x86_64, armeabi-v7a, arm64-v8a.
6466

67+
6568
**iOS**
6669

6770
Please install the following required packages:
@@ -132,7 +135,7 @@ open android/app/build.gradle
132135
dependencies:
133136
flutter:
134137
sdk: flutter
135-
+ compdfkit_flutter: ^1.11.0
138+
+ compdfkit_flutter: ^1.12.0
136139
```
137140

138141
7. From the terminal app, run the following command to get all the packages:
@@ -287,7 +290,7 @@ cd example
287290
dependencies:
288291
flutter:
289292
sdk: flutter
290-
+ compdfkit_flutter: ^1.11.0
293+
+ compdfkit_flutter: ^1.12.0
291294
```
292295

293296
4. From the terminal app, run the following command to get all the packages:
@@ -313,8 +316,8 @@ open ios/Podfile
313316
use_modular_headers!`
314317

315318
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
316-
+ pod 'ComPDFKit_Tools', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.11.0.podspec'
317-
+ pod 'ComPDFKit', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.11.0.podspec'
319+
+ pod 'ComPDFKit_Tools', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.12.0.podspec'
320+
+ pod 'ComPDFKit', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.12.0.podspec'
318321

319322
end
320323
```
@@ -442,7 +445,7 @@ class _MyAppState extends State<MyApp> {
442445

443446
11. To protect user privacy, before accessing the sensitive privacy data, you need to find the "***Info\***" configuration in your iOS 10.0 or higher iOS project and configure the relevant privacy terms as shown in the following picture.
444447

445-
![](screenshots/1-8.png)
448+
![](./screenshots/1-8.png)
446449

447450
```objective-c
448451
<key>NSCameraUsageDescription</key>
@@ -472,6 +475,52 @@ flutter run
472475

473476

474477

478+
## UI Customization
479+
480+
In version **1.12.0**, we have expanded the options that can be defined in the [CPDFConfiguration](./lib/cpdf_configuration.dart) class. When using the `ComPDFKit.openDocument` method to open a PDF View, you can define this object to meet your product requirements. We will continue to enrich configuration options in the future to further enhance the flexibility of the product. Here are some examples of commonly used configuration options:
481+
482+
1. Set the initial display mode and the list of available modes. The following code shows enabling only the viewer mode and annotations mode:
483+
484+
```dart
485+
var configuration = CPDFConfiguration(modeConfig: const ModeConfig(
486+
initialViewMode: CPreviewMode.viewer,
487+
availableViewModes: [
488+
CPreviewMode.viewer,
489+
CPreviewMode.annotations
490+
]
491+
));
492+
ComPDFKit.openDocument(documentPath, password: '', configuration: configuration);
493+
```
494+
495+
2. Set the list of enabled annotation types and default annotation attribute values. For example, enable only highlight annotations and set the color and transparency for highlight annotations:
496+
497+
```dart
498+
var configuration = CPDFConfiguration(
499+
annotationsConfig: const CPDFAnnotationsConfig(
500+
availableTypes: [CPDFAnnotationType.highlight],
501+
initAttribute: CPDFAnnotationAttribute(
502+
highlight: CPDFAnnotAttr.highlight(color: Colors.blue, alpha: 255))));
503+
504+
ComPDFKit.openDocument(documentPath, password: '', configuration: configuration);
505+
```
506+
507+
3. Set the display mode and page flipping direction:
508+
509+
```dart
510+
var configuration = CPDFConfiguration(
511+
readerViewConfig: const ReaderViewConfig(
512+
displayMode: CPDFDisplayMode.doublePage,
513+
verticalMode: false
514+
)
515+
);
516+
517+
ComPDFKit.openDocument(documentPath, password: '', configuration: configuration);
518+
```
519+
520+
> Note: For more information, please refer to the options defined in the [CPDFConfiguration](./lib/cpdf_configuration.dart) class
521+
522+
523+
475524
## Example APP
476525

477526
To see [ComPDFKit for Flutter](https://www.compdf.com/contact-sales) in action, check out our [Flutter example app](example/) and [API reference](https://pub.dev/documentation/compdfkit_flutter/latest/compdfkit/compdfkit-library.html)
@@ -503,7 +552,10 @@ ComPDFKit.openDocument(tempDocumentPath, password: '', configuration: CPDFConfi
503552

504553
ComPDFKit PDF SDK supports flexible licensing options, please contact [our sales team](mailto:support@compdf.com) to know more. Each license is only valid for one application ID in development mode. However, any documents, sample code, or source code distribution from the released package of ComPDFKit PDF SDK to any third party is prohibited.
505554

555+
556+
506557
## Note
558+
507559
We are glad to announce that you can register a ComPDFKit API account for a [free trial](https://api.compdf.com/api/pricing) to process 1000 documents per month for free.
508560

509561
Thanks,

android/build.gradle

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rootProject.allprojects {
2525
apply plugin: 'com.android.library'
2626

2727
android {
28-
compileSdkVersion 33
28+
compileSdk 33
2929

3030
compileOptions {
3131
sourceCompatibility JavaVersion.VERSION_1_8
@@ -36,18 +36,14 @@ android {
3636
minSdkVersion 21
3737
}
3838

39-
buildFeatures {
40-
viewBinding = true
41-
}
42-
4339
dependencies {
4440
compileOnly fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
4541
implementation 'com.google.android.material:material:1.8.0'
4642
implementation 'androidx.appcompat:appcompat:1.6.1'
4743
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
48-
api 'com.compdf:compdfkit:1.11.0'
49-
api 'com.compdf:compdfkit-ui:1.11.0'
50-
api 'com.compdf:compdfkit-tools:1.11.0'
44+
api 'com.compdf:compdfkit:1.12.0'
45+
api 'com.compdf:compdfkit-ui:1.12.0'
46+
api 'com.compdf:compdfkit-tools:1.12.0'
5147
testImplementation 'junit:junit:4.13.2'
5248
testImplementation 'org.mockito:mockito-core:5.0.0'
5349
api 'com.github.bumptech.glide:glide:4.15.1'
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.compdfkit.flutter.compdfkit_flutter">
33
<application>
4-
<activity android:name=".pdf.CPDFDocumentActivity"
5-
android:exported="false"
6-
android:theme="@style/CPDFDocumentActivityStyle"/>
4+
75
</application>
86
</manifest>

android/src/main/java/com/compdfkit/flutter/compdfkit_flutter/pdf/CPDFConfiguration.java

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)