Skip to content

Commit dc91723

Browse files
committed
feat: release v1.0.3
1 parent b08e0a8 commit dc91723

File tree

4 files changed

+116
-29
lines changed

4 files changed

+116
-29
lines changed

README.md

+39-22
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,40 @@
77
This guide walks you through building a web application that scans single-page documents using **DDS**, with **pre-defined configurations**.
88

99
**Table of Contents**
10-
- [License](#license)
11-
- [Get a Trial License](#get-a-trial-license)
12-
- [Get a Full License](#get-a-full-license)
13-
- [Quick Start](#quick-start)
14-
- [Option 1: Build from Source](#option-1-build-from-source)
15-
- [Option 2: Use Precompiled Script](#option-2-use-precompiled-script)
16-
- [Hello World Sample Explained](#hello-world-sample-explained)
17-
- [Reference DDS](#reference-dds)
18-
- [Instantiate DDS](#instantiate-dds)
19-
- [Launch DDS](#launch-dds)
20-
- [Display the Result](#display-the-result)
21-
- [Custom Usage](#custom-usage)
22-
- [DocumentScannerConfig Overview](#documentscannerconfig-overview)
23-
- [Workflow Customization](#workflow-customization)
24-
- [View-Based Customization](#view-based-customization)
25-
- [Self-Hosting Resource Files](#self-hosting-resource-files)
26-
- [Next Step](#next-step)
10+
- [Scan Single-Page Documents with Dynamsoft Document Scanner](#scan-single-page-documents-with-dynamsoft-document-scanner)
11+
- [License](#license)
12+
- [Get a Trial License](#get-a-trial-license)
13+
- [Get a Full License](#get-a-full-license)
14+
- [Quick Start](#quick-start)
15+
- [Option 1: Build from Source](#option-1-build-from-source)
16+
- [Option 2: Use Precompiled Script](#option-2-use-precompiled-script)
17+
- [Hello World Sample Explained](#hello-world-sample-explained)
18+
- [Reference DDS](#reference-dds)
19+
- [Instantiate DDS](#instantiate-dds)
20+
- [Launch DDS](#launch-dds)
21+
- [Display the Result](#display-the-result)
22+
- [Custom Usage](#custom-usage)
23+
- [DocumentScannerConfig Overview](#documentscannerconfig-overview)
24+
- [Workflow Customization](#workflow-customization)
25+
- [Example 1: Specify the Container for DocumentScanner](#example-1-specify-the-container-for-documentscanner)
26+
- [Example 2: Specify Only the Container for DocumentScannerView](#example-2-specify-only-the-container-for-documentscannerview)
27+
- [Example 3: Specify Individual View Containers](#example-3-specify-individual-view-containers)
28+
- [View-Based Customization](#view-based-customization)
29+
- [`DocumentScannerView` Configuration](#documentscannerview-configuration)
30+
- [Steps to Customize the UI for `DocumentScannerView`](#steps-to-customize-the-ui-for-documentscannerview)
31+
- [Styling Buttons](#styling-buttons)
32+
- [Customizing Apply Button Callback](#customizing-apply-button-callback)
33+
- [`DocumentResultView` Configuration](#documentresultview-configuration)
34+
- [Styling Buttons](#styling-buttons-1)
35+
- [Customizing the "Done" Button Callback](#customizing-the-done-button-callback)
36+
- [Customizing the "Upload" Button](#customizing-the-upload-button)
37+
- [Self-Hosting Resource Files](#self-hosting-resource-files)
38+
- [Modify the Build Script](#modify-the-build-script)
39+
- [Update the Engine Resource Paths](#update-the-engine-resource-paths)
40+
- [Update the UI Configuration](#update-the-ui-configuration)
41+
- [Build the Project](#build-the-project)
42+
- [Serve the Project Locally](#serve-the-project-locally)
43+
- [Next Step](#next-step)
2744

2845
## License
2946

@@ -84,7 +101,7 @@ Since the **DDS library files** are published on [**npm**](https://www.npmjs.com
84101
85102
To use the precompiled script, simply include the following URL in a `<script>` tag:
86103
```html
87-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/dds.bundle.js"></script>
104+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/dds.bundle.js"></script>
88105
```
89106
90107
Below is the complete **Hello World** sample page that uses this precompiled script from a CDN.
@@ -99,7 +116,7 @@ Below is the complete **Hello World** sample page that uses this precompiled scr
99116
<meta charset="utf-8" />
100117
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
101118
<title>Dynamsoft Document Scanner - Hello World</title>
102-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/dds.bundle.js"></script>
119+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/dds.bundle.js"></script>
103120
</head>
104121
<body>
105122
<h1 style="font-size: large">Dynamsoft Document Scanner</h1>
@@ -152,7 +169,7 @@ Let’s walk through the code in the Hello World Sample to understand how it wor
152169
<title>Dynamsoft Document Scanner - Hello World</title>
153170
<script src="../dist/dds.bundle.js"></script>
154171
<!--Alternatively, reference the script from CDN
155-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/dds.bundle.js"></script>
172+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/dds.bundle.js"></script>
156173
-->
157174
</head>
158175
```
@@ -166,7 +183,7 @@ In this step, **DDS** is referenced using a relative local path in the `<head>`
166183
Alternatively, the script can be referenced from a CDN:
167184
168185
```html
169-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/dds.bundle.js"></script>
186+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/dds.bundle.js"></script>
170187
```
171188
172189
**DDS** wraps all its dependency scripts, so a **DDS** project only needs to include **DDS** itself as a single script. No additional dependency scripts are required.
@@ -370,7 +387,7 @@ We previously covered `container` in [Workflow Customization](#workflow-customiz
370387
> If **DDS** performance does not meet your needs in your usage scenario, you may require a customized algorithm template for better results. In this case, please contact our experienced [Technical Support Team](https://www.dynamsoft.com/company/contact/) to discuss your requirements. They will help tailor a suitable template for you, which you can then apply by updating `templateFilePath`.
371388
372389
By default, `cameraEnhancerUIPath` points to a file hosted on the jsDelivr CDN:
373-
[https://cdn.jsdelivr.net/npm/[email protected].2/dist/document-scanner.ui.html](https://cdn.jsdelivr.net/npm/[email protected].2/dist/document-scanner.ui.html).
390+
[https://cdn.jsdelivr.net/npm/[email protected].3/dist/document-scanner.ui.html](https://cdn.jsdelivr.net/npm/[email protected].3/dist/document-scanner.ui.html).
374391
375392
This file defines the UI for `DocumentScannerView`. However, since files on the CDN **cannot be modified directly**, you need to use a **local version** to customize the UI. `cameraEnhancerUIPath` is used to specify the local version.
376393

package-lock.json

+70-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dynamsoft-document-scanner",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Dynamsoft Document Scanner (DDS) is a ready-to-use SDK for capturing and enhancing document images with automatic border detection, correction, and customizable workflows.",
55
"files": [
66
"/dist",
@@ -57,9 +57,12 @@
5757
"tslib": "^2.6.2",
5858
"typescript": "^5.3.3",
5959
"cors": "^2.8.5",
60-
"express": "^4.21.2"
60+
"express": "^4.21.2",
61+
"formidable": "^3.5.2"
6162
},
6263
"dependencies": {
63-
"dynamsoft-capture-vision-bundle": "2.6.1000"
64+
"dynamsoft-capture-vision-bundle": "2.6.1000",
65+
"dynamsoft-capture-vision-std": "1.4.21",
66+
"dynamsoft-image-processing": "2.4.31"
6467
}
6568
}

src/DocumentScanner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getElement, shouldCorrectImage } from "./views/utils";
1010

1111
// Default DCE UI path
1212
const DEFAULT_DCE_UI_PATH =
13-
"https://cdn.jsdelivr.net/npm/[email protected].1/dist/document-scanner.ui.html";
13+
"https://cdn.jsdelivr.net/npm/[email protected].3/dist/document-scanner.ui.html";
1414
const DEFAULT_CONTAINER_HEIGHT = "100dvh";
1515

1616
export interface DocumentScannerConfig {

0 commit comments

Comments
 (0)