Skip to content

Commit da644d5

Browse files
committed
compdfkit_flutter 2.1.0
1 parent dc88ca4 commit da644d5

Some content is hidden

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

45 files changed

+2750
-1602
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 2.1.0
2+
* Added the features support for ComPDFKit PDF SDK for iOS V2.1.0.
3+
* Added the features support for ComPDFKit PDF SDK for Android V2.1.0.
4+
* Added annotation reply functionality.
5+
* Optimized text aggregation logic for content editing.
6+
* Added font subsetting.
7+
* Added screenshot feature.
8+
* Android platform adaptation for **Laban Key Keyboard**.
9+
* Fixed an issue with the Ink annotation color display on Android.
10+
* `CPDFReaderWidgetController.dart` adds widget control methods.
11+
12+
113
## 2.0.2
214
* Added `CPDFReaderWidget` widget.
315
```dart

CONFIGURATION.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@ var configuration = CPDFConfiguration(
6464
]
6565
)
6666
);
67-
ComPDFKit.openDocument(document, password: '', configuration: configuration);
67+
ComPDFKit.openDocument(document, password: '', configuration: configuration);
68+
69+
// usage Widget
70+
Scaffold(
71+
resizeToAvoidBottomInset: false,
72+
appBar: AppBar(title: const Text('CPDFReaderWidget Example'),),
73+
body: CPDFReaderWidget(
74+
document: widget.documentPath,
75+
configuration: configuration
76+
));
6877
```
6978

7079
### Option Explanations
@@ -132,17 +141,18 @@ Configure functions for the top toolbar in the PDF view.
132141

133142
##### **availableMenus Constants**
134143

135-
| Name | Description |
136-
| -------------- | ---------------------------------------------------------- |
144+
| Name | Description |
145+
| -------------- | ------------------------------------------------------------ |
137146
| viewSetting | Settings related to PDF viewing, such as scroll direction and theme. |
138147
| documentEditor | Displays a list of PDF document thumbnails and allows page manipulation such as addition and deletion. |
139-
| documentInfo | Displays information related to the PDF document. |
148+
| documentInfo | Displays information related to the PDF document. |
140149
| watermark | Adds text or image watermark to the document, saving it as a new document. |
141-
| security | Sets viewing and permission passwords for the document. |
150+
| security | Sets viewing and permission passwords for the document. |
142151
| flattened | Flattens annotations and other content within the document, making annotations uneditable. |
143-
| save | Saves the document. |
144-
| share | Shares the PDF document. |
152+
| save | Saves the document. |
153+
| share | Shares the PDF document. |
145154
| openDocument | Opens the system file selector to choose and open a PDF document. |
155+
| snip | The PDF capture function allows you to capture an area in the PDF document and convert it into an image. |
146156
```json
147157
{
148158
"toolbarConfig": {
@@ -170,7 +180,8 @@ Configure functions for the top toolbar in the PDF view.
170180
"flattened",
171181
"save",
172182
"share",
173-
"openDocument"
183+
"openDocument",
184+
"snip"
174185
]
175186
}
176187
}
@@ -182,11 +193,12 @@ Configure annotation-related settings, such as enabling types displayed in the a
182193

183194
##### **Parameters**
184195

185-
| Name | Type | Description |
186-
| -------------- | ----- | ------------------------------------------------------------ |
187-
| availableTypes | Array | The types of annotations enabled in the toolbar at the bottom. |
188-
| availableTools | Array | Annotation tools, including `Setting`, `Undo`, and `Redo`. |
189-
| initAttribute | Array | Set default attributes for annotations. |
196+
| Name | Type | Description |
197+
| ---------------- | ------ |--------------------------------------------------------------------------|
198+
| availableTypes | Array | The types of annotations enabled in the toolbar at the bottom. |
199+
| availableTools | Array | Annotation tools, including `Setting`, `Undo`, and `Redo`. |
200+
| initAttribute | Array | Set default attributes for annotations. |
201+
| annotationAuthor | String | Set the author name when adding annotations and replying to annotations. |
190202

191203
##### **availableTypes Constants**
192204

@@ -760,9 +772,10 @@ This section is used to configure the types of forms enabled in the view's botto
760772

761773
##### Parameters
762774

763-
| Name | Type | Example | Description |
764-
| --------- | ------------- | ------- | ------------------------------------------------------------ |
765-
| themeMode | CPDFThemeMode | light | Set the view theme style, support `light`, `dark`, `system`, the default is `light` theme<br />**ComPDFKit SDK for Flutter:** => 2.0.2<br />Only Android Platform. |
775+
| Name | Type | Example | Description |
776+
| ----------------------- | ------------- | ------- | ------------------------------------------------------------ |
777+
| themeMode | CPDFThemeMode | light | Set the view theme style, support `light`, `dark`, `system`, the default is `light` theme<br />**ComPDFKit SDK for Flutter:** => 2.0.2<br />Only Android Platform. |
778+
| fileSaveExtraFontSubset | boolean | true | When saving a document, whether to save the used font set together with the document. |
766779

767780
##### themeMode Constants
768781

@@ -780,6 +793,7 @@ This section is used to configure the types of forms enabled in the view's botto
780793
{
781794
"modeConfig": {
782795
"initialViewMode": "viewer",
796+
"readerOnly": false,
783797
"availableViewModes": [
784798
"viewer",
785799
"annotations",
@@ -813,10 +827,12 @@ This section is used to configure the types of forms enabled in the view's botto
813827
"flattened",
814828
"save",
815829
"share",
816-
"openDocument"
830+
"openDocument",
831+
"snip"
817832
]
818833
},
819834
"annotationsConfig": {
835+
"annotationAuthor": "Guest",
820836
"availableTypes": [
821837
"note",
822838
"highlight",
@@ -1033,6 +1049,10 @@ This section is used to configure the types of forms enabled in the view's botto
10331049
"pageSpacing": 10,
10341050
"pageScale": 1.0,
10351051
"pageSameWidth":true
1052+
},
1053+
"global" : {
1054+
"themeMode" : "system",
1055+
"fileSaveExtraFontSubset" : true
10361056
}
10371057
}
10381058
```

0 commit comments

Comments
 (0)