|
@@ -1,11 +1,9 @@
|
|
|
# 1 Overview
|
|
|
|
|
|
-ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF fuctions to any React Native application, such as viewer, annotations, editing PDFs, forms and signatures.
|
|
|
+ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF fuctions to any React Native application, such as viewer, annotations, editing PDFs, forms and signatures.
|
|
|
|
|
|
More information can be found at [https://www.compdf.com/](https://www.compdf.com/)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 1.1 ComPDFKit for React Native
|
|
|
|
|
|
ComPDFKit for React Native consists of two elements.
|
|
@@ -15,16 +13,13 @@ The two elements for ComPDFKit for React Native:
|
|
|
- **PDF Core API**
|
|
|
|
|
|
The Core API can be used independently for document rendering, analysis, text extraction, text search, form filling, password security, annotation creation and manipulation, and much more.
|
|
|
-
|
|
|
- **PDF View**
|
|
|
|
|
|
The PDF View is a utility class that provides the functionality for developers to interact with rendering PDF documents per their requirements. The View Control provides fast and high-quality rendering, zooming, scrolling, and page navigation features. The View Control is derived from platform-related viewer classes (e.g. `UIView` on iOS) and allows for extension to accommodate specific user needs.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 1.2 Key Features
|
|
|
|
|
|
-**Viewer**
|
|
|
+**Viewer**
|
|
|
component offers:
|
|
|
|
|
|
- Standard page display modes, including Scrolling, Double Page, Crop Mode, and Cover Mode.
|
|
@@ -34,7 +29,7 @@ component offers:
|
|
|
- Switch between different themes, including Dark Mode, Sepia Mode, Reseda Mode, and Custom Color Mode.
|
|
|
- Text reflow.
|
|
|
|
|
|
-**Annotations**
|
|
|
+**Annotations**
|
|
|
component offers:
|
|
|
|
|
|
- Create, edit, and remove annotations, including Note, Link, Free Text, Line, Square, Circle, Highlight, Underline, Squiggly, Strikeout, Stamp, Ink, and Sound.
|
|
@@ -43,14 +38,14 @@ component offers:
|
|
|
- Support for annotation flattening.
|
|
|
- Predefine annotations.
|
|
|
|
|
|
-**Forms**
|
|
|
+**Forms**
|
|
|
component offers:
|
|
|
|
|
|
- Create, edit and remove form fields, including Push Button, Check Box, Radio Button, Text Field, Combo Box, List Box, and Signature.
|
|
|
- Fill PDF Forms.
|
|
|
- Support for PDF form flattening.
|
|
|
|
|
|
-**Document Editor**
|
|
|
+**Document Editor**
|
|
|
component offers:
|
|
|
|
|
|
- PDF manipulation, including Split pages, Extract pages, and Merge pages.
|
|
@@ -58,27 +53,27 @@ component offers:
|
|
|
- Document information setting.
|
|
|
- Extract images.
|
|
|
|
|
|
-**Content Editor**
|
|
|
+**Content Editor**
|
|
|
component offers:
|
|
|
|
|
|
- Programmatically add and remove text in PDFs and make it possible to edit PDFs like Word. Allow selecting text to copy, resize, change colors, text alignment, and the position of text boxes.
|
|
|
- Undo or redo any change.
|
|
|
- Find and Replace.
|
|
|
|
|
|
-**Security**
|
|
|
+**Security**
|
|
|
|
|
|
component offers:
|
|
|
|
|
|
- Encrypt and decrypt PDFs, including Permission setting and Password protected.
|
|
|
|
|
|
-**Watermark**
|
|
|
+**Watermark**
|
|
|
|
|
|
component offers:
|
|
|
|
|
|
- Add, remove, edit, update, and get the watermarks.
|
|
|
- Support text and image watermarks.
|
|
|
|
|
|
-**Digital Signatures**
|
|
|
+**Digital Signatures**
|
|
|
|
|
|
component offers:
|
|
|
|
|
@@ -89,21 +84,42 @@ component offers:
|
|
|
- Support PKCS12 certificates.
|
|
|
- Trust certificates.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 1.3 License
|
|
|
|
|
|
ComPDFKit for React Native is a commercial SDK, which requires a license to grant developer permission to release their apps. Each license is only valid for one `bundle ID` or `applicationId` in development mode. Other flexible licensing options are also supported, please contact [our marketing team](mailto:support@compdf.com) to know more. However, any documents, sample code, or source code distribution from the released package of ComPDFKit to any third party is prohibited.
|
|
|
|
|
|
+**Offline License:** In scenarios with high security requirements, no internet connectivity, or offline environments, we provide the option of an offline license. The offline license allows authorization and usage of the ComPDFKit PDF SDK when internet connectivity is not available.
|
|
|
+
|
|
|
+**Online License:** We have introduced an online license mechanism for enhanced license management. Through the online approach, you can manage and update your license more flexibly to meet the specific requirements of your project.
|
|
|
+
|
|
|
To initialize ComPDFKit using a license key, call either of the following before using any other ComPDFKit APIs or features:
|
|
|
|
|
|
To set the license key for Android , use:
|
|
|
|
|
|
+* **Offline license**
|
|
|
+
|
|
|
+```xml
|
|
|
+<!-- Add this license in the AndroidManifest.xml of the main module --/>
|
|
|
+<!-- Each ComPDFKit license is bound to a specific applicationId -->
|
|
|
+<!-- For example: com.compdfkit.pdfviewer -->
|
|
|
+<meta-data
|
|
|
+ android:name="compdfkit_key"
|
|
|
+ android:value="Your ComPDFKit Key" />
|
|
|
+
|
|
|
+<meta-data
|
|
|
+ android:name="compdfkit_offline"
|
|
|
+ android:value="true" />
|
|
|
+```
|
|
|
+
|
|
|
+* **Online license**
|
|
|
+
|
|
|
```xml
|
|
|
<!-- Add this license in the AndroidManifest.xml of the main module --/>
|
|
|
+<!-- Each ComPDFKit license is bound to a specific applicationId -->
|
|
|
+<!-- For example: com.compdfkit.pdfviewer -->
|
|
|
<meta-data
|
|
|
android:name="compdfkit_key"
|
|
|
- android:value="{your ComPDFKit key}" />
|
|
|
+ android:value="Your ComPDFKit Key" />
|
|
|
```
|
|
|
|
|
|
To set the license key for iOS, use:
|
|
@@ -112,20 +128,16 @@ To set the license key for iOS, use:
|
|
|
// Set your license key here. ComPDFKit is commercial software.
|
|
|
// Each ComPDFKit license is bound to a specific app bundle id.
|
|
|
// com.compdfkit.pdfviewer
|
|
|
-
|
|
|
+
|
|
|
[CPDFKit verifyWithKey:@"YOUR_LICENSE_KEY_GOES_HERE"];
|
|
|
```
|
|
|
|
|
|
-
|
|
|
-
|
|
|
# 2 Get Started
|
|
|
|
|
|
It's easy to embed ComPDFKit into React Native applications with a few lines of code. Let's take a few minutes to get started.
|
|
|
|
|
|
The following sections describe the optimal systems and environments to support, as well as quick integration steps.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 2.1 Requirements
|
|
|
|
|
|
**Android**
|
|
@@ -133,11 +145,8 @@ The following sections describe the optimal systems and environments to support,
|
|
|
Please install the following required packages:
|
|
|
|
|
|
* A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI)
|
|
|
-
|
|
|
* The [latest stable version of Android Studio](https://developer.android.com/studio)
|
|
|
-
|
|
|
* The [Android NDK](https://developer.android.com/studio/projects/install-ndk)
|
|
|
-
|
|
|
* An [Android Virtual Device](https://developer.android.com/studio/run/managing-avds.html) or a hardware device
|
|
|
|
|
|
Operating Environment Requirements:
|
|
@@ -145,16 +154,12 @@ Operating Environment Requirements:
|
|
|
* Android `minSdkVersion` of `21` or higher.
|
|
|
* ComPDFKit SDK 1.9.0 or higher.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
**iOS**
|
|
|
|
|
|
Please install the following required packages:
|
|
|
|
|
|
* A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI)
|
|
|
-
|
|
|
* The [latest stable version of Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12)
|
|
|
-
|
|
|
* The [latest stable version of CocoaPods](https://github.com/CocoaPods/CocoaPods/releases). Follow the [CocoaPods installation guide](https://guides.cocoapods.org/using/getting-started.html#installation) to install it.
|
|
|
|
|
|
Operating Environment Requirements:
|
|
@@ -163,8 +168,6 @@ Operating Environment Requirements:
|
|
|
* React Native dependency to version 3.0.0 or higher.
|
|
|
* iOS 10.0 or higher.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 2.2 Creating a New Project
|
|
|
|
|
|
Let's create a simple app that integrates ComPDFKit for React Native.
|
|
@@ -174,19 +177,16 @@ Let's create a simple app that integrates ComPDFKit for React Native.
|
|
|
```bash
|
|
|
cd ~/Documents
|
|
|
```
|
|
|
-
|
|
|
2. Create the React Native project by running the following command:
|
|
|
|
|
|
```bash
|
|
|
react-native init compdfkit_rn
|
|
|
```
|
|
|
-
|
|
|
3. In the terminal app, change the location of the current working directory inside the newly created project:
|
|
|
|
|
|
```bash
|
|
|
cd compdfkit_rn
|
|
|
```
|
|
|
-
|
|
|
4. Add the ComPDFKit library and import the presented PDF document.
|
|
|
|
|
|
### For Android
|
|
@@ -223,9 +223,9 @@ Add ComPDFKit SDK inside the dependencies section:
|
|
|
```diff
|
|
|
dependencies {
|
|
|
...
|
|
|
-+ implementation 'com.compdf:compdfkit:1.12.0'
|
|
|
-+ implementation 'com.compdf:compdfkit-ui:1.12.0'
|
|
|
-+ implementation 'com.compdf:compdfkit-tools:1.12.0'
|
|
|
++ implementation 'com.compdf:compdfkit:1.13.0'
|
|
|
++ implementation 'com.compdf:compdfkit-ui:1.13.0'
|
|
|
++ implementation 'com.compdf:compdfkit-tools:1.13.0'
|
|
|
}
|
|
|
```
|
|
|
|
|
@@ -234,7 +234,7 @@ open `android/app/src/main/AndroidManifest.xml` , add`ComPDFKit License` and `S
|
|
|
```diff
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
package="com.compdfkit.flutter.example">
|
|
|
-
|
|
|
+
|
|
|
<!-- Required to read and write documents from device storage -->
|
|
|
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
|
|
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
|
@@ -248,14 +248,19 @@ open `android/app/src/main/AndroidManifest.xml` , add`ComPDFKit License` and `S
|
|
|
+ <meta-data
|
|
|
+ android:name="compdfkit_key"
|
|
|
+ android:value="{your license key}" />
|
|
|
+
|
|
|
+ <!-- If you are using an offline authentication license, please set the code. -->
|
|
|
++ <meta-data
|
|
|
++ android:name="compdfkit_offline"
|
|
|
++ android:value="true"/>
|
|
|
...
|
|
|
</application>
|
|
|
</manifest>
|
|
|
```
|
|
|
|
|
|
-Copy the `pdf` folder and `res/layout` code from the sample project Android project to your project
|
|
|
+Copy the `pdf` folder code from the sample project Android project to your project
|
|
|
|
|
|
-<img src="./Image/1-5.png" alt="1-5" width="60%" height="60%" />
|
|
|
+<img src="./Image/1-5.png" alt="1-5" width="60%" />
|
|
|
|
|
|
Open the `MainApplication` file and fill in the following code in the `getPackages()` method
|
|
|
|
|
@@ -273,8 +278,6 @@ Copy the sample pdf file to the `assets` directory
|
|
|
|
|
|
<img src="./Image/1-6.png" alt="1-6" style="zoom:33%;" />
|
|
|
|
|
|
-
|
|
|
-
|
|
|
### For iOS
|
|
|
|
|
|
Open your project’s Podfile in a text editor:
|
|
@@ -313,8 +316,8 @@ target 'PDFView_RN' do
|
|
|
# Pods for testing
|
|
|
end
|
|
|
|
|
|
-+ pod 'ComPDFKit_Tools', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.12.0.podspec'
|
|
|
-+ pod 'ComPDFKit', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.12.0.podspec'
|
|
|
++ pod 'ComPDFKit_Tools', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.13.0.podspec'
|
|
|
++ pod 'ComPDFKit', podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.13.0.podspec'
|
|
|
|
|
|
# Enables Flipper.
|
|
|
#
|
|
@@ -338,7 +341,7 @@ pod install
|
|
|
Open your project’s Workspace in Xcode:
|
|
|
|
|
|
```bash
|
|
|
-open ios/PDFView_RN.xcworkspace
|
|
|
+open ios/PDFView_RN.xcworkspace
|
|
|
```
|
|
|
|
|
|
Make sure the deployment target is set to 10.0 or higher:
|
|
@@ -349,7 +352,7 @@ Import resource file,***"OpenPDFModule.swift"*** is the bridging file for conn
|
|
|
|
|
|

|
|
|
|
|
|
-Search for **bridging** in the **Build Settings** and locate the **Objective-C Bridging Header** option. Then, enter the file path of the header file ***"ComPDFKit_RN-Bridging-Header.h"***:
|
|
|
+Search for **bridging** in the **Build Settings** and locate the **Objective-C Bridging Header** option. Then, enter the file path of the header file ***"ComPDFKit_RN-Bridging-Header.h"***:
|
|
|
|
|
|

|
|
|
|
|
@@ -375,8 +378,6 @@ To protect user privacy, before accessing the sensitive privacy data, you need t
|
|
|
<string>Your consent is required before you could access the function.</string>
|
|
|
```
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 2.3 Run Project
|
|
|
|
|
|
1. Create an `assets` directory in the project's root directory and copy the **[configuration.json](./assets/configuration.json)** file from the demo to this directory.
|
|
@@ -588,273 +589,271 @@ The following only shows the key parts of the example. Please pass in the comple
|
|
|
|
|
|
The following is the complete [configuration](./assets/configuration.json) content with data description:
|
|
|
|
|
|
- ```json
|
|
|
- {
|
|
|
- "modeConfig": {
|
|
|
- "initialViewMode": "viewer", // When initializing the display mode, nsure that the selected mode exists in the availableViewModes. Otherwise, it will default to the viewer mode. Refer to the availableViewModes field for valid values.
|
|
|
- "availableViewModes": [ // Only modes listed in the mode list will be displayed.
|
|
|
- "viewer",
|
|
|
- "annotations",
|
|
|
- "contentEditor",
|
|
|
- "forms",
|
|
|
- "signatures"
|
|
|
- ]
|
|
|
- },
|
|
|
- "toolbarConfig": { // Top Toolbar Configuration
|
|
|
- "androidAvailableActions": [
|
|
|
- "thumbnail",
|
|
|
- "search",
|
|
|
- "bota",
|
|
|
- "menu"
|
|
|
- ],
|
|
|
- "iosLeftBarAvailableActions": [
|
|
|
- "back",
|
|
|
- "thumbnail"
|
|
|
- ],
|
|
|
- "iosRightBarAvailableActions": [
|
|
|
- "search",
|
|
|
- "bota",
|
|
|
- "menu"
|
|
|
- ],
|
|
|
- "availableMenus": [
|
|
|
- "viewSettings",
|
|
|
- "documentEditor",
|
|
|
- "documentInfo",
|
|
|
- "watermark",
|
|
|
- "security",
|
|
|
- "flattened",
|
|
|
- "save",
|
|
|
- "share",
|
|
|
- "openDocument"
|
|
|
- ]
|
|
|
- },
|
|
|
- "annotationsConfig": { // Annotation Feature Configuration
|
|
|
- "availableTypes": [ // List of enabled annotation types for the bottom annotation functionality
|
|
|
- "note",
|
|
|
- "highlight",
|
|
|
- "underline",
|
|
|
- "squiggly",
|
|
|
- "strikeout",
|
|
|
- "ink",
|
|
|
- "pencil", // only ios platform
|
|
|
- "circle",
|
|
|
- "square",
|
|
|
- "arrow",
|
|
|
- "line",
|
|
|
- "freetext",
|
|
|
- "signature",
|
|
|
- "stamp",
|
|
|
- "pictures",
|
|
|
- "link",
|
|
|
- "sound"
|
|
|
- ],
|
|
|
- "availableTools": [ // Annotation tools enabled for the bottom annotation functionality
|
|
|
- "setting",
|
|
|
- "undo",
|
|
|
- "redo"
|
|
|
- ],
|
|
|
- "initAttribute": { // Default properties for annotations upon initialization, influencing attributes such as color, transparency, etc., when adding annotations.
|
|
|
- "note": {
|
|
|
- "color": "#1460F3",
|
|
|
- "alpha": 255 // Color transparency 0~255
|
|
|
- },
|
|
|
- "highlight": {
|
|
|
- "color": "#1460F3",
|
|
|
- "alpha": 77
|
|
|
- },
|
|
|
- "underline": {
|
|
|
- "color": "#1460F3",
|
|
|
- "alpha": 77
|
|
|
- },
|
|
|
- "squiggly": {
|
|
|
- "color": "#1460F3",
|
|
|
- "alpha": 77
|
|
|
- },
|
|
|
- "strikeout": {
|
|
|
- "color": "#1460F3",
|
|
|
- "alpha": 77
|
|
|
- },
|
|
|
- "ink": {
|
|
|
- "color": "#1460F3",
|
|
|
- "alpha": 100,
|
|
|
- "borderWidth": 10
|
|
|
- },
|
|
|
- "square": {
|
|
|
- "fillColor": "#1460F3",
|
|
|
- "borderColor": "#000000",
|
|
|
- "colorAlpha" : 128,
|
|
|
- "borderWidth": 2,
|
|
|
- "borderStyle": {
|
|
|
- "style": "solid", // Border line styles: solid, dashed
|
|
|
- "dashGap": 0.0 // Dashed line interval length, applicable only when the style is set to 'dashed'.
|
|
|
- }
|
|
|
- },
|
|
|
- "circle": {
|
|
|
- "fillColor": "#1460F3",
|
|
|
- "borderColor": "#000000",
|
|
|
- "colorAlpha" : 128,
|
|
|
- "borderWidth": 2,
|
|
|
- "borderStyle": {
|
|
|
- "style": "solid",
|
|
|
- "dashGap": 0.0
|
|
|
- }
|
|
|
- },
|
|
|
- "line": {
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderAlpha": 100,
|
|
|
- "borderWidth": 5,
|
|
|
- "borderStyle": {
|
|
|
- "style": "solid",
|
|
|
- "dashGap": 0.0
|
|
|
- }
|
|
|
- },
|
|
|
- "arrow": {
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderAlpha": 100,
|
|
|
- "borderWidth": 5,
|
|
|
- "borderStyle": {
|
|
|
- "style": "solid",
|
|
|
- "dashGap": 0.0
|
|
|
- },
|
|
|
- "startLineType": "none", // Starting arrow style options: none, openArrow, closedArrow, square, circle, diamond.
|
|
|
- "tailLineType": "openArrow" // tail arrow style options
|
|
|
- },
|
|
|
- "freeText": {
|
|
|
- "fontColor": "#000000",
|
|
|
- "fontColorAlpha": 255,
|
|
|
- "fontSize": 30,
|
|
|
- "isBold": false,
|
|
|
- "isItalic": false,
|
|
|
- "alignment": "left", // left, center, right
|
|
|
- "typeface": "Helvetica" // Courier, Helvetica, Times-Roman
|
|
|
+```json
|
|
|
+{
|
|
|
+ "modeConfig": {
|
|
|
+ "initialViewMode": "viewer", // When initializing the display mode, nsure that the selected mode exists in the availableViewModes. Otherwise, it will default to the viewer mode. Refer to the availableViewModes field for valid values.
|
|
|
+ "availableViewModes": [ // Only modes listed in the mode list will be displayed.
|
|
|
+ "viewer",
|
|
|
+ "annotations",
|
|
|
+ "contentEditor",
|
|
|
+ "forms",
|
|
|
+ "signatures"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "toolbarConfig": { // Top Toolbar Configuration
|
|
|
+ "androidAvailableActions": [
|
|
|
+ "thumbnail",
|
|
|
+ "search",
|
|
|
+ "bota",
|
|
|
+ "menu"
|
|
|
+ ],
|
|
|
+ "iosLeftBarAvailableActions": [
|
|
|
+ "back",
|
|
|
+ "thumbnail"
|
|
|
+ ],
|
|
|
+ "iosRightBarAvailableActions": [
|
|
|
+ "search",
|
|
|
+ "bota",
|
|
|
+ "menu"
|
|
|
+ ],
|
|
|
+ "availableMenus": [
|
|
|
+ "viewSettings",
|
|
|
+ "documentEditor",
|
|
|
+ "documentInfo",
|
|
|
+ "watermark",
|
|
|
+ "security",
|
|
|
+ "flattened",
|
|
|
+ "save",
|
|
|
+ "share",
|
|
|
+ "openDocument"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "annotationsConfig": { // Annotation Feature Configuration
|
|
|
+ "availableTypes": [ // List of enabled annotation types for the bottom annotation functionality
|
|
|
+ "note",
|
|
|
+ "highlight",
|
|
|
+ "underline",
|
|
|
+ "squiggly",
|
|
|
+ "strikeout",
|
|
|
+ "ink",
|
|
|
+ "pencil", // only ios platform
|
|
|
+ "circle",
|
|
|
+ "square",
|
|
|
+ "arrow",
|
|
|
+ "line",
|
|
|
+ "freetext",
|
|
|
+ "signature",
|
|
|
+ "stamp",
|
|
|
+ "pictures",
|
|
|
+ "link",
|
|
|
+ "sound"
|
|
|
+ ],
|
|
|
+ "availableTools": [ // Annotation tools enabled for the bottom annotation functionality
|
|
|
+ "setting",
|
|
|
+ "undo",
|
|
|
+ "redo"
|
|
|
+ ],
|
|
|
+ "initAttribute": { // Default properties for annotations upon initialization, influencing attributes such as color, transparency, etc., when adding annotations.
|
|
|
+ "note": {
|
|
|
+ "color": "#1460F3",
|
|
|
+ "alpha": 255 // Color transparency 0~255
|
|
|
+ },
|
|
|
+ "highlight": {
|
|
|
+ "color": "#1460F3",
|
|
|
+ "alpha": 77
|
|
|
+ },
|
|
|
+ "underline": {
|
|
|
+ "color": "#1460F3",
|
|
|
+ "alpha": 77
|
|
|
+ },
|
|
|
+ "squiggly": {
|
|
|
+ "color": "#1460F3",
|
|
|
+ "alpha": 77
|
|
|
+ },
|
|
|
+ "strikeout": {
|
|
|
+ "color": "#1460F3",
|
|
|
+ "alpha": 77
|
|
|
+ },
|
|
|
+ "ink": {
|
|
|
+ "color": "#1460F3",
|
|
|
+ "alpha": 100,
|
|
|
+ "borderWidth": 10
|
|
|
+ },
|
|
|
+ "square": {
|
|
|
+ "fillColor": "#1460F3",
|
|
|
+ "borderColor": "#000000",
|
|
|
+ "colorAlpha" : 128,
|
|
|
+ "borderWidth": 2,
|
|
|
+ "borderStyle": {
|
|
|
+ "style": "solid", // Border line styles: solid, dashed
|
|
|
+ "dashGap": 0.0 // Dashed line interval length, applicable only when the style is set to 'dashed'.
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- "contentEditorConfig": {
|
|
|
- "availableTypes": [
|
|
|
- "editorText",
|
|
|
- "editorImage"
|
|
|
- ],
|
|
|
- "availableTools": [
|
|
|
- "setting",
|
|
|
- "undo",
|
|
|
- "redo"
|
|
|
- ],
|
|
|
- "initAttribute": { // Default attributes for text type in content editing, influencing text properties when adding text.
|
|
|
- "text": {
|
|
|
- "fontColor": "#000000",
|
|
|
- "fontColorAlpha" : 100,
|
|
|
- "fontSize": 30,
|
|
|
- "isBold": false,
|
|
|
- "isItalic": false,
|
|
|
- "typeface": "Times-Roman", // Courier, Helvetica, Times-Roman
|
|
|
- "alignment": "left" // left, center, right
|
|
|
+ },
|
|
|
+ "circle": {
|
|
|
+ "fillColor": "#1460F3",
|
|
|
+ "borderColor": "#000000",
|
|
|
+ "colorAlpha" : 128,
|
|
|
+ "borderWidth": 2,
|
|
|
+ "borderStyle": {
|
|
|
+ "style": "solid",
|
|
|
+ "dashGap": 0.0
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- "formsConfig": {
|
|
|
- "availableTypes": [ // Types of forms displayed in the list of the bottom form toolbar.
|
|
|
- "textField",
|
|
|
- "checkBox",
|
|
|
- "radioButton",
|
|
|
- "listBox",
|
|
|
- "comboBox",
|
|
|
- "signaturesFields",
|
|
|
- "pushButton"
|
|
|
- ],
|
|
|
- "availableTools": [
|
|
|
- "undo",
|
|
|
- "redo"
|
|
|
- ],
|
|
|
- "initAttribute": {
|
|
|
- "textField": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderWidth": 2,
|
|
|
- "fontColor": "#000000",
|
|
|
- "fontSize": 20,
|
|
|
- "isBold": false,
|
|
|
- "isItalic": false,
|
|
|
- "alignment": "left", // left, center, right
|
|
|
- "multiline": true,
|
|
|
- "typeface": "Helvetica" // Courier, Helvetica, Times-Roman
|
|
|
- },
|
|
|
- "checkBox": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderWidth": 2,
|
|
|
- "checkedColor": "#43474D",
|
|
|
- "isChecked": false,
|
|
|
- "checkedStyle": "check" // check, circle, cross, diamond, square, star
|
|
|
- },
|
|
|
- "radioButton": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderWidth": 2,
|
|
|
- "checkedColor": "#43474D",
|
|
|
- "isChecked": false,
|
|
|
- "checkedStyle": "circle" // check, circle, cross, diamond, square, star
|
|
|
- },
|
|
|
- "listBox": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderWidth": 2,
|
|
|
- "fontColor": "#000000",
|
|
|
- "fontSize": 20,
|
|
|
- "typeface": "Helvetica", // Courier, Helvetica, Times-Roman
|
|
|
- "isBold": false,
|
|
|
- "isItalic": false
|
|
|
- },
|
|
|
- "comboBox": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderWidth": 2,
|
|
|
- "fontColor": "#000000",
|
|
|
- "fontSize": 20,
|
|
|
- "typeface": "Helvetica", // Courier, Helvetica, Times-Roman
|
|
|
- "isBold": false,
|
|
|
- "isItalic": false
|
|
|
- },
|
|
|
- "pushButton": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#1460F3",
|
|
|
- "borderWidth": 2,
|
|
|
- "fontColor": "#000000",
|
|
|
- "fontSize": 20,
|
|
|
- "title": "Button",
|
|
|
- "typeface": "Helvetica", // Courier, Helvetica, Times-Roman
|
|
|
- "isBold": false,
|
|
|
- "isItalic": false
|
|
|
- },
|
|
|
- "signaturesFields": {
|
|
|
- "fillColor": "#DDE9FF",
|
|
|
- "borderColor": "#000000",
|
|
|
- "borderWidth": 2
|
|
|
+ },
|
|
|
+ "line": {
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderAlpha": 100,
|
|
|
+ "borderWidth": 5,
|
|
|
+ "borderStyle": {
|
|
|
+ "style": "solid",
|
|
|
+ "dashGap": 0.0
|
|
|
}
|
|
|
+ },
|
|
|
+ "arrow": {
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderAlpha": 100,
|
|
|
+ "borderWidth": 5,
|
|
|
+ "borderStyle": {
|
|
|
+ "style": "solid",
|
|
|
+ "dashGap": 0.0
|
|
|
+ },
|
|
|
+ "startLineType": "none", // Starting arrow style options: none, openArrow, closedArrow, square, circle, diamond.
|
|
|
+ "tailLineType": "openArrow" // tail arrow style options
|
|
|
+ },
|
|
|
+ "freeText": {
|
|
|
+ "fontColor": "#000000",
|
|
|
+ "fontColorAlpha": 255,
|
|
|
+ "fontSize": 30,
|
|
|
+ "isBold": false,
|
|
|
+ "isItalic": false,
|
|
|
+ "alignment": "left", // left, center, right
|
|
|
+ "typeface": "Helvetica" // Courier, Helvetica, Times-Roman
|
|
|
}
|
|
|
- },
|
|
|
- "readerViewConfig": {
|
|
|
- "linkHighlight": true,
|
|
|
- "formFieldHighlight": true,
|
|
|
- "displayMode": "singlePage", // singlePage, doublePage, coverPage
|
|
|
- "continueMode": true,
|
|
|
- "verticalMode": true,
|
|
|
- "cropMode": false,
|
|
|
- "themes" : "light", // light, dark, sepia, reseda
|
|
|
- "enableSliderBar": true,
|
|
|
- "enablePageIndicator": true,
|
|
|
- "pageSpacing": 10,
|
|
|
- "pageScale": 1.0
|
|
|
}
|
|
|
+ },
|
|
|
+ "contentEditorConfig": {
|
|
|
+ "availableTypes": [
|
|
|
+ "editorText",
|
|
|
+ "editorImage"
|
|
|
+ ],
|
|
|
+ "availableTools": [
|
|
|
+ "setting",
|
|
|
+ "undo",
|
|
|
+ "redo"
|
|
|
+ ],
|
|
|
+ "initAttribute": { // Default attributes for text type in content editing, influencing text properties when adding text.
|
|
|
+ "text": {
|
|
|
+ "fontColor": "#000000",
|
|
|
+ "fontColorAlpha" : 100,
|
|
|
+ "fontSize": 30,
|
|
|
+ "isBold": false,
|
|
|
+ "isItalic": false,
|
|
|
+ "typeface": "Times-Roman", // Courier, Helvetica, Times-Roman
|
|
|
+ "alignment": "left" // left, center, right
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "formsConfig": {
|
|
|
+ "availableTypes": [ // Types of forms displayed in the list of the bottom form toolbar.
|
|
|
+ "textField",
|
|
|
+ "checkBox",
|
|
|
+ "radioButton",
|
|
|
+ "listBox",
|
|
|
+ "comboBox",
|
|
|
+ "signaturesFields",
|
|
|
+ "pushButton"
|
|
|
+ ],
|
|
|
+ "availableTools": [
|
|
|
+ "undo",
|
|
|
+ "redo"
|
|
|
+ ],
|
|
|
+ "initAttribute": {
|
|
|
+ "textField": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderWidth": 2,
|
|
|
+ "fontColor": "#000000",
|
|
|
+ "fontSize": 20,
|
|
|
+ "isBold": false,
|
|
|
+ "isItalic": false,
|
|
|
+ "alignment": "left", // left, center, right
|
|
|
+ "multiline": true,
|
|
|
+ "typeface": "Helvetica" // Courier, Helvetica, Times-Roman
|
|
|
+ },
|
|
|
+ "checkBox": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderWidth": 2,
|
|
|
+ "checkedColor": "#43474D",
|
|
|
+ "isChecked": false,
|
|
|
+ "checkedStyle": "check" // check, circle, cross, diamond, square, star
|
|
|
+ },
|
|
|
+ "radioButton": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderWidth": 2,
|
|
|
+ "checkedColor": "#43474D",
|
|
|
+ "isChecked": false,
|
|
|
+ "checkedStyle": "circle" // check, circle, cross, diamond, square, star
|
|
|
+ },
|
|
|
+ "listBox": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderWidth": 2,
|
|
|
+ "fontColor": "#000000",
|
|
|
+ "fontSize": 20,
|
|
|
+ "typeface": "Helvetica", // Courier, Helvetica, Times-Roman
|
|
|
+ "isBold": false,
|
|
|
+ "isItalic": false
|
|
|
+ },
|
|
|
+ "comboBox": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderWidth": 2,
|
|
|
+ "fontColor": "#000000",
|
|
|
+ "fontSize": 20,
|
|
|
+ "typeface": "Helvetica", // Courier, Helvetica, Times-Roman
|
|
|
+ "isBold": false,
|
|
|
+ "isItalic": false
|
|
|
+ },
|
|
|
+ "pushButton": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#1460F3",
|
|
|
+ "borderWidth": 2,
|
|
|
+ "fontColor": "#000000",
|
|
|
+ "fontSize": 20,
|
|
|
+ "title": "Button",
|
|
|
+ "typeface": "Helvetica", // Courier, Helvetica, Times-Roman
|
|
|
+ "isBold": false,
|
|
|
+ "isItalic": false
|
|
|
+ },
|
|
|
+ "signaturesFields": {
|
|
|
+ "fillColor": "#DDE9FF",
|
|
|
+ "borderColor": "#000000",
|
|
|
+ "borderWidth": 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "readerViewConfig": {
|
|
|
+ "linkHighlight": true,
|
|
|
+ "formFieldHighlight": true,
|
|
|
+ "displayMode": "singlePage", // singlePage, doublePage, coverPage
|
|
|
+ "continueMode": true,
|
|
|
+ "verticalMode": true,
|
|
|
+ "cropMode": false,
|
|
|
+ "themes" : "light", // light, dark, sepia, reseda
|
|
|
+ "enableSliderBar": true,
|
|
|
+ "enablePageIndicator": true,
|
|
|
+ "pageSpacing": 10,
|
|
|
+ "pageScale": 1.0
|
|
|
}
|
|
|
- ```
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
|
|
|
|
|
|
# 4 Support
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 4.1 Reporting Problems
|
|
|
|
|
|
Thank you for your interest in ComPDFKit PDF SDK, the only easy-to-use but powerful development solution to integrate high quality PDF rendering capabilities to your applications. If you encounter any technical questions or bug issues when using ComPDFKit PDF SDK for React Native, please submit the problem report to the ComPDFKit team. More information as follows would help us to solve your problem:
|
|
@@ -864,8 +863,6 @@ Thank you for your interest in ComPDFKit PDF SDK, the only easy-to-use but power
|
|
|
- Detailed descriptions of the problem.
|
|
|
- Any other related information, such as an error screenshot.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
## 4.2 Contact Information
|
|
|
|
|
|
**Home Link:**
|
|
@@ -876,7 +873,5 @@ Thank you for your interest in ComPDFKit PDF SDK, the only easy-to-use but power
|
|
|
|
|
|
Email: support@compdf.com
|
|
|
|
|
|
-
|
|
|
-
|
|
|
Thanks,
|
|
|
The ComPDFKit Team
|