diff --git a/_data/full_tree.yml b/_data/full_tree.yml
index c4c97fc..c87f50e 100644
--- a/_data/full_tree.yml
+++ b/_data/full_tree.yml
@@ -4,5 +4,6 @@ tree_file_list:
- sidelist-api.html
- sidelist-releasenotes.html
- sidelist-full-tree.html
-
-
+ - sidelist-apis-v2.0.html
+ - sidelist-full-tree.v2.0.html
+ - sidelist-introduction-v2.0.html
\ No newline at end of file
diff --git a/_data/product_version.yml b/_data/product_version.yml
index d8bede5..0e57e44 100644
--- a/_data/product_version.yml
+++ b/_data/product_version.yml
@@ -1,12 +1,9 @@
useGroupedVersion: true
version_info_list:
- - value: latest version(3.0)
+ - value: latest version(3.1)
+ - value: 3.0
- value: 2.0
- value: 1.x
child:
- - 1.1
-
-
-
-
\ No newline at end of file
+ - 1.1
\ No newline at end of file
diff --git a/api/document-scanner-private-v3.0.md b/api/document-scanner-private-v3.0.md
new file mode 100644
index 0000000..8d28eba
--- /dev/null
+++ b/api/document-scanner-private-v3.0.md
@@ -0,0 +1,733 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api/document-scanner-v3.0.md b/api/document-scanner-v3.0.md
new file mode 100644
index 0000000..70c530c
--- /dev/null
+++ b/api/document-scanner-v3.0.md
@@ -0,0 +1,342 @@
+---
+layout: default-layout
+needAutoGenerateSidebar: true
+needGenerateH3Content: true
+noTitleIndex: false
+title: Dynamsoft Document Scanner - API Reference
+keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, API, APIs
+breadcrumbText: API References
+description: Dynamsoft Document Scanner - API Reference
+---
+
+# Dynamsoft Document Scanner API Reference
+
+The `DocumentScanner` class handles the document scanning process, including image capture, correction, and result display.
+
+
+
+## Constructor
+### DocumentScanner
+#### Syntax
+```typescript
+new DocumentScanner(config: DocumentScannerConfig)
+```
+
+#### Parameters
+- `config` *([DocumentScannerConfig](#documentscannerconfig))* : Configuration settings for the scanner, including license, container, view settings and more.
+
+#### Example
+
+```html
+
+```
+
+```javascript
+const documentScanner = new Dynamsoft.DocumentScanner({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ scannerViewConfig: {
+ container: document.getElementById("myDocumentScannerViewContainer") // Use this container for the scanner view
+ }
+});
+```
+
+## Methods
+
+### launch()
+
+Starts the **document scanning workflow**.
+
+#### Syntax
+```typescript
+launch(): Promise
+```
+
+#### Returns
+- A `Promise` resolving to a `DocumentResult` object.
+
+#### Example
+```typescript
+const result = await documentScanner.launch();
+
+if (result?.correctedImageResult) {
+ resultContainer.innerHTML = "";
+ const canvas = result.correctedImageResult.toCanvas();
+ resultContainer.appendChild(canvas);
+} else {
+ resultContainer.innerHTML = "
No image scanned. Please try again.
";
+}
+```
+
+### dispose()
+
+Cleans up resources and hides UI components.
+
+#### Syntax
+```typescript
+dispose(): void
+```
+
+#### Example
+```typescript
+documentScanner.dispose();
+console.log("Scanner resources released.");
+```
+
+## Configuration Interfaces
+### DocumentScannerConfig
+
+#### Syntax
+```typescript
+interface DocumentScannerConfig {
+ license?: string;
+ container?: HTMLElement | string;
+ scannerViewConfig?: DocumentScannerViewConfig;
+ resultViewConfig?: DocumentResultViewConfig;
+ correctionViewConfig?: DocumentCorrectionViewConfig;
+ templateFilePath?: string;
+ utilizedTemplateNames?: UtilizedTemplateNames;
+ engineResourcePaths: EngineResourcePaths;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ----------------------- | ------------------------------ | --------------------------------------------------------------- |
+| `license` | `string` | The license key for using the `DocumentScanner`. |
+| `container` | `HTMLElement \| string` | The container element or selector for the `DocumentScanner` UI. |
+| `scannerViewConfig` | `DocumentScannerViewConfig` | Configuration settings for the scanner view. |
+| `resultViewConfig` | `DocumentResultViewConfig` | Configuration settings for the result view. |
+| `correctionViewConfig` | `DocumentCorrectionViewConfig` | Configuration settings for the correction view. |
+| `templateFilePath` | `string` | The file path to the document template used for scanning. |
+| `utilizedTemplateNames` | `UtilizedTemplateNames` | Specifies detection and correction templates. |
+| `engineResourcePaths` | `EngineResourcePaths` | Paths to the necessary resources for the scanning engine. |
+
+#### Example
+```typescript
+const config = {
+ license: "YOUR_LICENSE_KEY_HERE",
+ scannerViewConfig: {
+ cameraEnhancerUIPath: "./dist/document-scanner.ui.html", // Use the local file
+ },
+ engineResourcePaths: {
+ std: "./dist/libs/dynamsoft-capture-vision-std/dist/",
+ dip: "./dist/libs/dynamsoft-image-processing/dist/",
+ core: "./dist/libs/dynamsoft-core/dist/",
+ license: "./dist/libs/dynamsoft-license/dist/",
+ cvr: "./dist/libs/dynamsoft-capture-vision-router/dist/",
+ ddn: "./dist/libs/dynamsoft-document-normalizer/dist/",
+ },
+};
+```
+
+### DocumentScannerViewConfig
+
+Configures the scanner view for capturing documents.
+
+#### Syntax
+```typescript
+interface DocumentScannerViewConfig {
+ cameraEnhancerUIPath?: string;
+ container?: HTMLElement;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | ------------- | ------------------------------------------------------------ |
+| `cameraEnhancerUIPath` | `string` | Path to the UI (`.html` template file) for the scanner view. |
+| `container` | `HTMLElement` | The container element for the scanner view. |
+
+#### Example
+
+```javascript
+const documentScanner = new Dynamsoft.DocumentScanner({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace with your actual license key
+ scannerViewConfig: {
+ cameraEnhancerUIPath: "../dist/document-scanner.ui.html", // Use the local file
+ },
+});
+```
+
+### DocumentCorrectionViewConfig
+
+Configures the correction view for adjusting scanned documents, including toolbar buttons and event handlers for completion.
+
+#### Syntax
+```typescript
+interface DocumentCorrectionViewConfig {
+ container?: HTMLElement;
+ toolbarButtonsConfig?: DocumentCorrectionViewToolbarButtonsConfig;
+ onFinish?: (result: DocumentResult) => void;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | -------------------------------------------- | --------------------------------------------------------- |
+| `container` | `HTMLElement` | The container element for the correction view. |
+| `toolbarButtonsConfig` | `DocumentCorrectionViewToolbarButtonsConfig` | Configuration for toolbar buttons in the correction view. |
+| `onFinish` | `(result: DocumentResult) => void` | Callback function triggered when correction is finished. |
+
+#### Example
+
+```javascript
+const documentScanner = new Dynamsoft.DocumentScanner({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ correctionViewConfig: {
+ onFinish: (result) => {
+ const canvas = result.correctedImageResult.toCanvas();
+ resultContainer.appendChild(canvas);
+ }
+ }
+});
+```
+
+### DocumentResultViewConfig
+
+Configures the result view for reviewing scanned documents, including toolbar buttons and event handlers for uploads and completion.
+
+#### Syntax
+```typescript
+interface DocumentResultViewConfig {
+ container?: HTMLElement;
+ toolbarButtonsConfig?: DocumentResultViewToolbarButtonsConfig;
+ onDone?: (result: DocumentResult) => Promise;
+ onUpload?: (result: DocumentResult) => Promise;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | ------------------------------------------- | ----------------------------------------------------------- |
+| `container` | `HTMLElement` | The container element for the result view. |
+| `toolbarButtonsConfig` | `DocumentResultViewToolbarButtonsConfig` | Configuration for toolbar buttons in the result view. |
+| `onDone` | `(result: DocumentResult) => Promise` | Callback function triggered when scanning is done. |
+| `onUpload` | `(result: DocumentResult) => Promise` | Callback function triggered when uploading the scan result. |
+
+#### Example
+```javascript
+const documentScanner = new Dynamsoft.DocumentScanner({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ resultViewConfig: {
+ onDone: async (result) =>
+ {
+ const canvas = result.correctedImageResult.toCanvas();
+ resultContainer.appendChild(canvas);
+ }
+ }
+});
+```
+
+### DocumentResult
+
+Represents the output of a scan, including the original and corrected images, detected boundaries, and scan status.
+
+#### Syntax
+```typescript
+interface DocumentResult {
+ status: ResultStatus;
+ correctedImageResult?: NormalizedImageResultItem | DSImageData;
+ originalImageResult?: OriginalImageResultItem["imageData"];
+ detectedQuadrilateral?: Quadrilateral;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ----------------------- | ------------------------------------------ | ------------------------------------------------------------ |
+| `status` | `ResultStatus` | The status of the document scan (success, failed, canceled). |
+| `originalImageResult` | `OriginalImageResultItem["imageData"]` | The original captured image before correction. |
+| `correctedImageResult` | `NormalizedImageResultItem \| DSImageData` | The processed (corrected) image. |
+| `detectedQuadrilateral` | `Quadrilateral` | The detected document boundaries. |
+
+## Toolbar Button Configurations
+
+### ToolbarButtonConfig
+
+A simplified configuration type for toolbar buttons.
+
+#### Syntax
+```typescript
+export type ToolbarButtonConfig = Pick<"icon" | "label" | "isHidden">;
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------- | -------------------- | ----------------------------------- |
+| `icon` | `string` | The icon displayed on the button. |
+| `label` | `string` | The text label for the button. |
+| `isHidden` | `boolean` (optional) | Determines if the button is hidden. |
+
+#### Example
+```typescript
+const documentScanner = new Dynamsoft.DocumentScanner({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ correctionViewConfig: {
+ toolbarButtonsConfig: {
+ fullImage: {
+ isHidden: true
+ },
+ detectBorders: {
+ icon: "path/to/new_icon.png", // Change to the actual path of the new icon
+ label: "Custom Label"
+ }
+ }
+ }
+});
+```
+
+### Configurable Buttons Per Each View
+
+#### DocumentCorrectionViewToolbarButtonsConfig
+```typescript
+interface DocumentCorrectionViewToolbarButtonsConfig {
+ fullImage?: ToolbarButtonConfig;
+ detectBorders?: ToolbarButtonConfig;
+ apply?: ToolbarButtonConfig;
+}
+```
+
+#### DocumentCorrectionViewToolbarButtonsConfig
+
+```typescript
+interface DocumentCorrectionViewToolbarButtonsConfig {
+ fullImage?: ToolbarButtonConfig;
+ detectBorders?: ToolbarButtonConfig;
+ apply?: ToolbarButtonConfig;
+}
+```
+
+#### DocumentResultViewToolbarButtonsConfig
+
+```typescript
+interface DocumentResultViewToolbarButtonsConfig {
+ retake?: ToolbarButtonConfig;
+ correct?: ToolbarButtonConfig;
+ share?: ToolbarButtonConfig;
+ upload?: ToolbarButtonConfig;
+ done?: ToolbarButtonConfig;
+}
+```
+
diff --git a/api/document-scanner.md b/api/document-scanner.md
index 70c530c..98ec472 100644
--- a/api/document-scanner.md
+++ b/api/document-scanner.md
@@ -31,14 +31,16 @@ The `DocumentScanner` class handles the document scanning process, including ima
-->
## Constructor
+
### DocumentScanner
+
#### Syntax
```typescript
new DocumentScanner(config: DocumentScannerConfig)
```
#### Parameters
-- `config` *([DocumentScannerConfig](#documentscannerconfig))* : Configuration settings for the scanner, including license, container, view settings and more.
+- `config` ([`DocumentScannerConfig`](#documentscannerconfig)) : Configuration settings for the scanner, including license, container, view settings and more.
#### Example
@@ -57,7 +59,7 @@ const documentScanner = new Dynamsoft.DocumentScanner({
## Methods
-### launch()
+### `launch()`
Starts the **document scanning workflow**.
@@ -82,7 +84,7 @@ if (result?.correctedImageResult) {
}
```
-### dispose()
+### `dispose()`
Cleans up resources and hides UI components.
@@ -98,7 +100,8 @@ console.log("Scanner resources released.");
```
## Configuration Interfaces
-### DocumentScannerConfig
+
+### `DocumentScannerConfig`
#### Syntax
```typescript
@@ -145,7 +148,7 @@ const config = {
};
```
-### DocumentScannerViewConfig
+### `DocumentScannerViewConfig`
Configures the scanner view for capturing documents.
@@ -159,10 +162,16 @@ interface DocumentScannerViewConfig {
#### Properties
-| Property | Type | Description |
-| ---------------------- | ------------- | ------------------------------------------------------------ |
-| `cameraEnhancerUIPath` | `string` | Path to the UI (`.html` template file) for the scanner view. |
-| `container` | `HTMLElement` | The container element for the scanner view. |
+| Property | Type | Description |
+| --------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------- |
+| `templateFilePath` | `string` | Path to a Capture Vision template for scanning configuration. |
+| `cameraEnhancerUIPath` | `string` | Path to the UI (`.html` template file) for the scanner view. |
+| `container` | `HTMLElement` | The container element for the scanner view. |
+| `utilizedTemplateNames` | `UtilizedTemplateNames` | Capture Vision template names for detection and correction. |
+| `enableAutoCropMode` | `boolean` | The default auto-crop mode state. |
+| `enableSmartCaptureMode` | `boolean` | The default smart capture mode state. |
+| `scanRegion` | `ScanRegion` | Defines the region within the viewport to detect documents. |
+| `minVerifiedFramesForAutoCapture` | `number` | The minimum number of camera frames to detect document boundaries on Smart Capture mode. |
#### Example
@@ -175,7 +184,7 @@ const documentScanner = new Dynamsoft.DocumentScanner({
});
```
-### DocumentCorrectionViewConfig
+### `DocumentCorrectionViewConfig`
Configures the correction view for adjusting scanned documents, including toolbar buttons and event handlers for completion.
@@ -210,7 +219,7 @@ const documentScanner = new Dynamsoft.DocumentScanner({
});
```
-### DocumentResultViewConfig
+### `DocumentResultViewConfig`
Configures the result view for reviewing scanned documents, including toolbar buttons and event handlers for uploads and completion.
@@ -247,7 +256,7 @@ const documentScanner = new Dynamsoft.DocumentScanner({
});
```
-### DocumentResult
+### `DocumentResult`
Represents the output of a scan, including the original and corrected images, detected boundaries, and scan status.
@@ -272,7 +281,7 @@ interface DocumentResult {
## Toolbar Button Configurations
-### ToolbarButtonConfig
+### `ToolbarButtonConfig`
A simplified configuration type for toolbar buttons.
diff --git a/api/index-v3.0.md b/api/index-v3.0.md
new file mode 100644
index 0000000..a45a99a
--- /dev/null
+++ b/api/index-v3.0.md
@@ -0,0 +1,27 @@
+---
+layout: default-layout
+needAutoGenerateSidebar: true
+needGenerateH3Content: true
+noTitleIndex: true
+title: Mobile Web Capture - API Reference Index
+keywords: Documentation, Mobile Web Capture, API Index
+description: Mobile Web Capture Documentation API Reference Index
+---
+
+# API Reference Index
+
+## Scan Single-Page Documents
+
+If you need to scan single-page documents and do not require handling PDF files (import or export), you only need **Dynamsoft Document Scanner (DDS)**, a component of **Mobile Web Capture (MWC)**. You can find its API reference here:
+
+- [Dynamsoft Document Scanner API Reference]({{ site.api }}document-scanner.html)
+
+> See it in action with the [Dynamsoft Document Scanner Demo](https://demo.dynamsoft.com/document-scanner/).
+
+## Scan Multi-Page Documents
+
+If you need to handle multi-page documents, PDF files, annotations, and more, you will need the full-featured **Mobile Web Capture (MWC)**. You can find its API reference here:
+
+- [Mobile Web Capture API Reference]({{ site.api }}mobile-web-capture.html)
+
+> See it in action with the [Mobile Web Capture Demo](https://demo.dynamsoft.com/mobile-web-capture/).
diff --git a/api/index.md b/api/index.md
index a45a99a..b69240a 100644
--- a/api/index.md
+++ b/api/index.md
@@ -16,6 +16,7 @@ If you need to scan single-page documents and do not require handling PDF files
- [Dynamsoft Document Scanner API Reference]({{ site.api }}document-scanner.html)
+> [!TIP]
> See it in action with the [Dynamsoft Document Scanner Demo](https://demo.dynamsoft.com/document-scanner/).
## Scan Multi-Page Documents
@@ -24,4 +25,5 @@ If you need to handle multi-page documents, PDF files, annotations, and more, yo
- [Mobile Web Capture API Reference]({{ site.api }}mobile-web-capture.html)
+> [!TIP]
> See it in action with the [Mobile Web Capture Demo](https://demo.dynamsoft.com/mobile-web-capture/).
diff --git a/api/mobile-web-capture-v3.0.md b/api/mobile-web-capture-v3.0.md
new file mode 100644
index 0000000..d72ff75
--- /dev/null
+++ b/api/mobile-web-capture-v3.0.md
@@ -0,0 +1,641 @@
+---
+layout: default-layout
+needAutoGenerateSidebar: true
+needGenerateH3Content: true
+noTitleIndex: false
+title: Dynamsoft Mobile Web Capture - API Reference
+keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, API, APIs
+breadcrumbText: API Reference
+description: Mobile Web Capture API Reference
+---
+
+# Mobile Web Capture API Reference
+
+The `MobileWebCapture` class manages document scanning, viewing, and management.
+
+
+
+## Constructor
+
+### MobileWebCapture
+
+#### Syntax
+```typescript
+constructor(config: MobileWebCaptureConfig)
+```
+
+#### Parameters
+
+| Parameter | Type | Description |
+| --------- | ------------------------ | ---------------------------------------------------- |
+| `config` | `MobileWebCaptureConfig` | The configuration settings for **MobileWebCapture**. |
+
+#### Example
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ documentScannerConfig: {
+ showResultView: false,
+ showCorrectionView: false,
+ },
+});
+(async () => {
+ // Launch the Mobile Web Capture Instance
+ const fileName = `New_Document_${Date.now().toString().slice(-5)}`;
+ await mobileWebCapture.launch(fileName);
+})();
+```
+
+## Methods
+
+### launch()
+
+Starts the **Mobile Web Capture** workflow.
+
+#### Syntax
+```typescript
+launch(file?: File | string): Promise
+```
+
+#### Parameters
+
+| Parameter | Type | Description |
+| --------- | --------------------------- | ------------------------------------------ |
+| `file` | `File \| string` (optional) | A file or document name to open at launch. |
+
+#### Throws
+- An error if **MWC** is already running.
+
+#### Example
+```typescript
+await mobileWebCapture.launch();
+console.log("MWC launched successfully.");
+```
+
+**Launching with a File**
+
+```html
+
+```
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+});
+document.getElementById("initialFile").onchange = async function () {
+ const files = Array.from(this.files || []);
+ if (files.length) {
+ // Launch the Mobile Web Capture instance with an initial file
+ if (mobileWebCapture.hasLaunched)
+ await mobileWebCapture.dispose();
+ await mobileWebCapture.launch(files[0]);
+ }
+};
+```
+
+### dispose()
+
+Cleans up resources and closes the `MobileWebCapture` instance.
+
+#### Syntax
+```typescript
+dispose(): Promise
+```
+
+#### Example
+```typescript
+await mobileWebCapture.dispose();
+console.log("MWC resources released.");
+```
+
+## Properties
+
+### hasLaunched
+
+Returns whether the `MobileWebCapture` instance is running.
+
+#### Syntax
+```typescript
+readonly hasLaunched: boolean;
+```
+
+```html
+
+```
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+});
+document.getElementById("initialFile").onchange = async function () {
+ const files = Array.from(this.files || []);
+ if (files.length) {
+ // Launch the Mobile Web Capture instance with an initial file
+ if (mobileWebCapture.hasLaunched)
+ await mobileWebCapture.dispose();
+ await mobileWebCapture.launch(files[0]);
+ }
+};
+```
+
+## Configuration Interfaces
+
+### MobileWebCaptureConfig
+
+#### Syntax
+```typescript
+interface MobileWebCaptureConfig {
+ license?: string;
+ container?: HTMLElement | string;
+ exportConfig?: ExportConffig;
+ showLibraryView?: boolean;
+ onClose?: () => void;
+
+ // View Configs
+ libraryViewConfig?: LibraryViewConfig;
+ documentViewConfig?: DocumentViewConfig;
+ pageViewConfig?: PageViewConfig;
+ transferViewConfig?: TransferViewConfig;
+ historyViewConfig?: HistoryViewConfig;
+
+ // DDS Config
+ documentScannerConfig?:DocumentScannerConfig
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ----------------------- | ----------------------- | -------------------------------------------------------------------------------- |
+| `license` | `string` | The license key for using **Mobile Web Capture (MWC)**. |
+| `container` | `HTMLElement \| string` | The container element or selector for rendering the `MobileWebCapture` instance. |
+| `exportConfig` | `ExportConfig` | Configuration for exporting captured documents. |
+| `showLibraryView` | `boolean` | Determines if the **LibraryView** is shown (default: `true`). |
+| `onClose` | `() => void` | Callback function triggered when the `MobileWebCapture` instance is closed. |
+| `libraryViewConfig` | `LibraryViewConfig` | Configuration for the **LibraryView**. |
+| `documentViewConfig` | `DocumentViewConfig` | Configuration for the **DocumentView**. |
+| `pageViewConfig` | `PageViewConfig` | Configuration for the **PageView**. |
+| `transferViewConfig` | `TransferViewConfig` | Configuration for the **TransferView**. |
+| `historyViewConfig` | `HistoryViewConfig` | Configuration for the **HistoryView**. |
+| `documentScannerConfig` | `DocumentScannerConfig` | Configuration for the built-in **DocumentScanner**. |
+
+##### See Also
+
+- [DocumentScannerConfig](https://www.dynamsoft.com/mobile-web-capture/docs/api/document-scanner.html#documentscannerconfig)
+
+#### Example
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ ddvResourcePath: "./dist/libs/dynamsoft-document-viewer/dist/",
+ documentScannerConfig: {
+ scannerViewConfig: {
+ cameraEnhancerUIPath: "./dist/document-scanner.ui.html", // Use the local file
+ },
+ engineResourcePaths: {
+ std: "./dist/libs/dynamsoft-capture-vision-std/dist/",
+ dip: "./dist/libs/dynamsoft-image-processing/dist/",
+ core: "./dist/libs/dynamsoft-core/dist/",
+ license: "./dist/libs/dynamsoft-license/dist/",
+ cvr: "./dist/libs/dynamsoft-capture-vision-router/dist/",
+ ddn: "./dist/libs/dynamsoft-document-normalizer/dist/",
+ },
+ },
+});
+```
+
+### LibraryViewConfig
+
+#### Syntax
+```typescript
+interface LibraryViewConfig {
+ emptyContentConfig?: EmptyContentConfig;
+ toolbarButtonsConfig?: LibraryToolbarButtonsConfig;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | ----------------------------- | ---------------------------------------------------------------------------- |
+| `emptyContentConfig` | `EmptyContentConfig` | Configuration for the content displayed on the empty **LibraryView** screen. |
+| `toolbarButtonsConfig` | `LibraryToolbarButtonsConfig` | Configuration for the toolbar buttons in **LibraryView**. |
+
+#### Example 1: Display A Message In An Empty Library
+
+By default, the `LibraryView` displays the following when empty:
+
+
+
+You can customize its appearance using the `emptyContentConfig` property.
+
+```html
+
Create Your First Document!
+```
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ showLibraryView: true, // Enable LibraryView
+ libraryViewConfig: {
+ emptyContentConfig: document.getElementById("customizedLibraryViewContent"),
+ },
+});
+```
+
+#### Example 2: Disable Upload in LibraryView
+
+When `exportConfig.uploadToServer` is defined and `showLibraryView` is `true`, an **Upload** button will appears in `LibraryView`. The following example demonstrates how to hide the button.
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ showLibraryView: true // Enable LibraryView
+ libraryViewConfig: {
+ toolbarButtonsConfig: {
+ upload: {
+ isHidden: true
+ }
+ }
+ }
+});
+```
+
+### DocumentViewConfig
+
+#### Syntax
+```typescript
+interface DocumentViewConfig {
+ emptyContentConfig?: EmptyContentConfig;
+ toolbarButtonsConfig?: DocumentToolbarButtonsConfig;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- |
+| `emptyContentConfig` | `EmptyContentConfig` | Configuration for the content displayed on the empty **DocumentView** screen. |
+| `toolbarButtonsConfig` | `DocumentToolbarButtonsConfig` | Configuration for the toolbar buttons in **DocumentView**. |
+
+#### Example 1: Display A Message In An Empty Document
+
+By default, the `DocumentView` displays the following when empty:
+
+
+
+You can customize its appearance using the `emptyContentConfig` property.
+
+```html
+
Start Your Document!
+```
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ documentViewConfig: {
+ emptyContentConfig: document.getElementById("customizedDocViewContent"),
+ },
+});
+```
+
+#### Example 2: Disable Upload in DocumentView
+
+When `exportConfig.uploadToServer` is defined, the **Upload** button appears in both `DocumentView` and `PageView`. The following example demonstrates how to disable this feature by hiding it in `DocumentView`, ensuring that the **Upload** button only appears in `PageView`.
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ documentViewConfig: {
+ toolbarButtonsConfig: { // Note that there are two upload buttons in DocumentView
+ uploadDocument: {
+ isHidden: true
+ },
+ uploadImage: {
+ isHidden: true
+ }
+ }
+ }
+});
+```
+
+#### Example 3: Update the Button Icon
+
+If you don't like a button's icon, you can customize it. The following example shows how to change the icon of the **"Share Document"** button:
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ documentViewConfig: {
+ toolbarButtonsConfig: { // Note that there are two upload buttons in DocumentView
+ shareDocument: {
+ icon: "path/to/new_icon.png", // Change to the actual path of the new icon
+ label: "Custom Label"
+ }
+ }
+ }
+});
+```
+
+### PageViewConfig
+
+#### Syntax
+```typescript
+interface PageViewConfig {
+ toolbarButtonsConfig?: PageViewToolbarButtonsConfig;
+ annotationToolbarLabelConfig?: DDVAnnotationToolbarLabelConfig;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ------------------------------ | --------------------------------- | -------------------------------------------------- |
+| `toolbarButtonsConfig` | `PageViewToolbarButtonsConfig` | Configuration for toolbar buttons in **PageView**. |
+| `annotationToolbarLabelConfig` | `DDVAnnotationToolbarLabelConfig` | Configuration for annotation toolbar labels. |
+
+#### Example 1: Disable Upload in PageView
+
+In this example, we'll demonstrate how to hide the **Upload** button in `PageView` even when `exportConfig.uploadToServer` is defined, ensuring that it only appears in `DocumentView`.
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ pageViewConfig: {
+ toolbarButtonsConfig: {
+ upload: {
+ isHidden: true
+ }
+ }
+ }
+});
+```
+
+#### Example 2: Change the Labels of the Annotation Toolbar Buttons
+
+You can customize the labels of the annotation toolbar buttons as follows:
+
+```javascript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ pageViewConfig: {
+ annotationToolbarLabelConfig: {
+ TextBoxAnnotation: "Input Text",
+ },
+ }
+});
+```
+
+### HistoryViewConfig
+
+#### Syntax
+```typescript
+interface HistoryViewConfig {
+ emptyContentConfig?: EmptyContentConfig;
+ toolbarButtonsConfig?: HistoryToolbarButtonsConfig;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | ----------------------------- | ---------------------------------------------------------------------------- |
+| `emptyContentConfig` | `EmptyContentConfig` | Configuration for the content displayed on the empty **HistoryView** screen. |
+| `toolbarButtonsConfig` | `HistoryToolbarButtonsConfig` | Configuration for the toolbar buttons in **HistoryView**. |
+
+### TransferViewConfig
+
+#### Syntax
+```typescript
+interface TransferViewConfig {
+ toolbarButtonsConfig?: TransferToolbarButtonsConfig;
+}
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------------------- | ------------------------------ | ---------------------------------------------------------- |
+| `toolbarButtonsConfig` | `TransferToolbarButtonsConfig` | Configuration for the toolbar buttons in **TransferView**. |
+
+## Toolbar Button Configurations
+
+### ToolbarButtonConfig
+
+A simplified configuration type for toolbar buttons.
+
+#### Syntax
+```typescript
+export type ToolbarButtonConfig = Pick<"icon" | "label" | "isHidden">;
+```
+
+#### Properties
+
+| Property | Type | Description |
+| ---------- | -------------------- | ----------------------------------- |
+| `icon` | `string` | The icon displayed on the button. |
+| `label` | `string` | The text label for the button. |
+| `isHidden` | `boolean` (optional) | Determines if the button is hidden. |
+
+#### Example
+```typescript
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ documentViewConfig: {
+ toolbarButtonsConfig: { // Note that there are two upload buttons in DocumentView
+ uploadDocument: {
+ isHidden: true
+ },
+ uploadImage: {
+ isHidden: true
+ }
+ }
+ }
+});
+```
+
+### Configurable Buttons Per Each View
+
+#### LibraryToolbarButtonsConfig
+```typescript
+interface LibraryToolbarButtonsConfig {
+ newDoc?: ToolbarButtonConfig;
+ capture?: ToolbarButtonConfig;
+ import?: ToolbarButtonConfig;
+ uploads?: ToolbarButtonConfig;
+
+ // Selected Toolbar Options
+ delete?: ToolbarButtonConfig;
+ print?: ToolbarButtonConfig;
+ share?: ToolbarButtonConfig;
+ upload?: ToolbarButtonConfig;
+ back?: ToolbarButtonConfig;
+}
+```
+
+#### DocumentToolbarButtonsConfig
+```typescript
+interface DocumentToolbarButtonsConfig {
+ backToLibrary?: ToolbarButtonConfig;
+ capture?: ToolbarButtonConfig;
+ import?: ToolbarButtonConfig;
+ shareDocument?: ToolbarButtonConfig;
+ uploadDocument?: ToolbarButtonConfig;
+ manage?: ToolbarButtonConfig;
+
+ // Selected Toolbar Options
+ copyTo?: ToolbarButtonConfig;
+ moveTo?: ToolbarButtonConfig;
+ selectAll?: ToolbarButtonConfig;
+ deleteImage?: ToolbarButtonConfig;
+ shareImage?: ToolbarButtonConfig;
+ uploadImage?: ToolbarButtonConfig;
+ back?: ToolbarButtonConfig;
+}
+```
+
+#### PageViewToolbarButtonsConfig
+```typescript
+interface PageViewToolbarButtonsConfig {
+ back?: ToolbarButtonConfig;
+ delete?: ToolbarButtonConfig;
+ addPage?: ToolbarButtonConfig;
+ upload?: ToolbarButtonConfig;
+ share?: ToolbarButtonConfig;
+ edit?: ToolbarButtonConfig;
+
+ // Edit mode toolbar
+ crop?: ToolbarButtonConfig;
+ rotate?: ToolbarButtonConfig;
+ filter?: ToolbarButtonConfig;
+ annotate?: ToolbarButtonConfig;
+ done?: ToolbarButtonConfig;
+}
+
+```
+
+#### HistoryToolbarButtonsConfig
+```typescript
+interface HistoryToolbarButtonsConfig {
+ back?: ToolbarButtonConfig;
+}
+```
+
+#### TransferToolbarButtonsConfig
+```typescript
+interface TransferToolbarButtonsConfig {
+ cancel?: ToolbarButtonConfig;
+ action?: ToolbarButtonConfig;
+}
+```
+
+## Assisting Interfaces
+
+### ExportConfig
+
+The `ExportConfig` interface defines methods for handling document export functionality, such as uploading, downloading, deleting files from a server, and managing the upload success process. This allows full customization of how documents are exported and managed in your application.
+
+#### Properties
+
+##### uploadToServer
+
+Uploads a document to the server. The function receives the document's file name and its binary data (`Blob`). It returns a `Promise` that resolves with `void` or an `UploadedDocument` object.
+> **Important:** Returning `{ status: "success" }` in this function is required to trigger [onUploadSuccess](#onuploadsuccess)
+
+###### **Type**
+```typescript
+(fileName: string, blob: Blob) => Promise
+```
+
+##### downloadFromServer
+
+Downloads a document from the server. The function receives an `UploadedDocument` object and returns a `Promise` that resolves once the download is complete.
+
+###### **Type**
+```typescript
+(doc: UploadedDocument) => Promise
+```
+
+##### deleteFromServer
+
+Deletes a document from the server. The function receives an `UploadedDocument` object and returns a `Promise` that resolves once the deletion is successful.
+
+###### **Type**
+```typescript
+(doc: UploadedDocument) => Promise
+```
+
+##### onUploadSuccess
+
+Called after a successful upload. It receives the file name, file type, the current view (`EnumMWCViews`), and the binary data (`Blob`). The function should return a `Promise` that resolves to `true` if the `MobileWebCapture` instance should close after uploading or `false` if it should remain open.
+> **Important:** Returning `{ status: "success" }` in [uploadToServer](#uploadtoserver) is required to trigger this function.
+
+###### **Type**
+```typescript
+(fileName: string, fileType: string, view: EnumMWCViews, blob: Blob) => Promise
+```
+
+#### Example Usage
+
+```javascript
+const uploadToServer = async (fileName, blob) => {
+ const host = window.location.origin;
+ // Create form data
+ const formData = new FormData();
+ formData.append("uploadFile", blob, fileName);
+ // Upload file
+ const response = await fetch(
+ `${host}/upload`, // Change this to your actul upload URL
+ {
+ method: "POST",
+ body: formData,
+ }
+ );
+ if (response.status === 200) {
+ // **IMPORTANT**: Returning { status: "success" } is required to trigger onUploadSuccess.
+ return {
+ status: "success",
+ };
+ } else {
+ return {
+ status: "failed",
+ };
+ }
+};
+const onUploadSuccess = async (fileName) => {
+ console.log(`${fileName} uploaded successfully!`);
+ return true; // Exit the Mobile Web Capture Instance
+};
+const mobileWebCapture = new Dynamsoft.MobileWebCapture({
+ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
+ exportConfig: {
+ uploadToServer,
+ onUploadSuccess,
+ },
+});
+(async () => {
+ // Launch the Mobile Web Capture Instance
+ const fileName = `New_Document_${Date.now().toString().slice(-5)}`;
+ await mobileWebCapture.launch(fileName);
+})();
+```
\ No newline at end of file
diff --git a/api/mobile-web-capture.md b/api/mobile-web-capture.md
index d72ff75..b233674 100644
--- a/api/mobile-web-capture.md
+++ b/api/mobile-web-capture.md
@@ -36,7 +36,7 @@ The `MobileWebCapture` class manages document scanning, viewing, and management.
## Constructor
-### MobileWebCapture
+### `MobileWebCapture`
#### Syntax
```typescript
@@ -67,7 +67,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
## Methods
-### launch()
+### `launch()`
Starts the **Mobile Web Capture** workflow.
@@ -112,7 +112,7 @@ document.getElementById("initialFile").onchange = async function () {
};
```
-### dispose()
+### `dispose()`
Cleans up resources and closes the `MobileWebCapture` instance.
@@ -129,7 +129,7 @@ console.log("MWC resources released.");
## Properties
-### hasLaunched
+### `hasLaunched`
Returns whether the `MobileWebCapture` instance is running.
@@ -159,7 +159,7 @@ document.getElementById("initialFile").onchange = async function () {
## Configuration Interfaces
-### MobileWebCaptureConfig
+### `MobileWebCaptureConfig`
#### Syntax
```typescript
@@ -224,7 +224,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
});
```
-### LibraryViewConfig
+### `LibraryViewConfig`
#### Syntax
```typescript
@@ -281,7 +281,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
});
```
-### DocumentViewConfig
+### `DocumentViewConfig`
#### Syntax
```typescript
@@ -357,7 +357,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
});
```
-### PageViewConfig
+### `PageViewConfig`
#### Syntax
```typescript
@@ -406,7 +406,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
});
```
-### HistoryViewConfig
+### `HistoryViewConfig`
#### Syntax
```typescript
@@ -423,7 +423,7 @@ interface HistoryViewConfig {
| `emptyContentConfig` | `EmptyContentConfig` | Configuration for the content displayed on the empty **HistoryView** screen. |
| `toolbarButtonsConfig` | `HistoryToolbarButtonsConfig` | Configuration for the toolbar buttons in **HistoryView**. |
-### TransferViewConfig
+### `TransferViewConfig`
#### Syntax
```typescript
@@ -440,7 +440,7 @@ interface TransferViewConfig {
## Toolbar Button Configurations
-### ToolbarButtonConfig
+### `ToolbarButtonConfig`
A simplified configuration type for toolbar buttons.
@@ -476,7 +476,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
### Configurable Buttons Per Each View
-#### LibraryToolbarButtonsConfig
+#### `LibraryToolbarButtonsConfig`
```typescript
interface LibraryToolbarButtonsConfig {
newDoc?: ToolbarButtonConfig;
@@ -493,7 +493,7 @@ interface LibraryToolbarButtonsConfig {
}
```
-#### DocumentToolbarButtonsConfig
+#### `DocumentToolbarButtonsConfig`
```typescript
interface DocumentToolbarButtonsConfig {
backToLibrary?: ToolbarButtonConfig;
@@ -514,7 +514,7 @@ interface DocumentToolbarButtonsConfig {
}
```
-#### PageViewToolbarButtonsConfig
+#### `PageViewToolbarButtonsConfig`
```typescript
interface PageViewToolbarButtonsConfig {
back?: ToolbarButtonConfig;
@@ -534,14 +534,14 @@ interface PageViewToolbarButtonsConfig {
```
-#### HistoryToolbarButtonsConfig
+#### `HistoryToolbarButtonsConfig`
```typescript
interface HistoryToolbarButtonsConfig {
back?: ToolbarButtonConfig;
}
```
-#### TransferToolbarButtonsConfig
+#### `TransferToolbarButtonsConfig`
```typescript
interface TransferToolbarButtonsConfig {
cancel?: ToolbarButtonConfig;
@@ -551,23 +551,25 @@ interface TransferToolbarButtonsConfig {
## Assisting Interfaces
-### ExportConfig
+### `ExportConfig`
The `ExportConfig` interface defines methods for handling document export functionality, such as uploading, downloading, deleting files from a server, and managing the upload success process. This allows full customization of how documents are exported and managed in your application.
#### Properties
-##### uploadToServer
+##### `uploadToServer`
Uploads a document to the server. The function receives the document's file name and its binary data (`Blob`). It returns a `Promise` that resolves with `void` or an `UploadedDocument` object.
-> **Important:** Returning `{ status: "success" }` in this function is required to trigger [onUploadSuccess](#onuploadsuccess)
+
+> [!IMPORTANT]
+> Returning `{ status: "success" }` in this function is required to trigger [onUploadSuccess](#onuploadsuccess)
###### **Type**
```typescript
(fileName: string, blob: Blob) => Promise
```
-##### downloadFromServer
+##### `downloadFromServer`
Downloads a document from the server. The function receives an `UploadedDocument` object and returns a `Promise` that resolves once the download is complete.
@@ -576,7 +578,7 @@ Downloads a document from the server. The function receives an `UploadedDocument
(doc: UploadedDocument) => Promise
```
-##### deleteFromServer
+##### `deleteFromServer`
Deletes a document from the server. The function receives an `UploadedDocument` object and returns a `Promise` that resolves once the deletion is successful.
@@ -585,10 +587,12 @@ Deletes a document from the server. The function receives an `UploadedDocument`
(doc: UploadedDocument) => Promise
```
-##### onUploadSuccess
+##### `onUploadSuccess`
Called after a successful upload. It receives the file name, file type, the current view (`EnumMWCViews`), and the binary data (`Blob`). The function should return a `Promise` that resolves to `true` if the `MobileWebCapture` instance should close after uploading or `false` if it should remain open.
-> **Important:** Returning `{ status: "success" }` in [uploadToServer](#uploadtoserver) is required to trigger this function.
+
+> [!IMPORTANT]
+> Returning `{ status: "success" }` in [uploadToServer](#uploadtoserver) is required to trigger this function.
###### **Type**
```typescript
diff --git a/api/relatedapi-v3.0.md b/api/relatedapi-v3.0.md
new file mode 100644
index 0000000..739aeb4
--- /dev/null
+++ b/api/relatedapi-v3.0.md
@@ -0,0 +1,17 @@
+---
+layout: default-layout
+needAutoGenerateSidebar: true
+needGenerateH3Content: true
+noTitleIndex: true
+title: Mobile Web Capture - Related API Reference
+keywords: Documentation, Mobile Web Capture, Related API Reference
+breadcrumbText: Related API Reference
+description: Mobile Web Capture Documentation Related API Reference
+permalink: /api/relatedapi.html
+---
+
+# Related API Reference
+
+## [Dynamsoft Document Viewer](https://www.dynamsoft.com/document-viewer/docs/api/index.html)
+
+## [Dynamsoft Document Normalizer](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/api-reference/index.html)
\ No newline at end of file
diff --git a/gettingstarted/adddependency.md b/gettingstarted/adddependency.md
index e7d7383..30aa3af 100644
--- a/gettingstarted/adddependency.md
+++ b/gettingstarted/adddependency.md
@@ -130,7 +130,6 @@ This is usually only required with frameworks like Angular or React, etc. where
Dynamsoft.Core.CoreModule.engineResourcePaths.dce = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.2/dist/";
```
-
+
\ No newline at end of file
diff --git a/gettingstarted/helloworld-v1.1.md b/gettingstarted/helloworld-v1.1.md
index 305e9f6..b0c4c92 100644
--- a/gettingstarted/helloworld-v1.1.md
+++ b/gettingstarted/helloworld-v1.1.md
@@ -406,7 +406,12 @@ document.getElementById("restore").onclick = () => {