You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-16
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
5
5
> See it in action with the [Dynamsoft Document Scanner Demo](https://demo.dynamsoft.com/document-scanner/).
6
6
7
-
This guide walks you through building a web application that scans single-page documents using DDS, with pre-defined configurations.
7
+
This guide walks you through building a web application that scans single-page documents using **DDS**, with pre-defined configurations.
8
8
9
-
**Table of Contents** Keep the TOC only for README of the GitHub Repo
9
+
**Table of Contents**
10
10
-[License](#license)
11
11
-[Get a Trial License](#get-a-trial-license)
12
12
-[Get a Full License](#get-a-full-license)
@@ -39,9 +39,9 @@ To purchase a full license, [contact us](https://www.dynamsoft.com/company/conta
39
39
40
40
## Quick Start
41
41
42
-
To use DDS, the first step is to obtain its library files. You can acquire them from one of the following sources:
42
+
The first step in using **DDS** is to obtain its library files. You can acquire them from one of the following sources:
43
43
44
-
1.[**GitHub**](https://github.com/Dynamsoft/document-scanner-javascript) – Contains the source files for the DDS SDK, which can be compiled into library files.
44
+
1.[**GitHub**](https://github.com/Dynamsoft/document-scanner-javascript) – Contains the source files for the **DDS** SDK, which can be compiled into library files.
45
45
2.[**npm**](https://www.npmjs.com/package/dynamsoft-document-scanner) – Provides precompiled library files via npm for easier installation.
46
46
3.[**CDN**](https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner) – Delivers precompiled library files through a CDN for quick and seamless integration.
47
47
@@ -52,11 +52,11 @@ You can choose one of the following methods to set up a Hello World page:
52
52
53
53
### Option 1: Build from Source
54
54
55
-
This method retrieves all DDS source files from its [GitHub Repository](https://github.com/Dynamsoft/document-scanner-javascript), compiles them into a distributable package, and then runs a *ready-made* Hello World sample page included in the repository.
55
+
This method retrieves all **DDS** source files from its [GitHub Repository](https://github.com/Dynamsoft/document-scanner-javascript), compiles them into a distributable package, and then runs a *ready-made* Hello World sample page included in the repository.
56
56
57
57
Follow these steps:
58
58
59
-
1. Download DDS from [GitHub](https://github.com/Dynamsoft/document-scanner-javascript) as a compressed folder.
59
+
1. Download **DDS** from [GitHub](https://github.com/Dynamsoft/document-scanner-javascript) as a compressed folder.
60
60
2. Extract the contents of the archive.
61
61
3. Enter the license key you received in [Get a Trial License](#get-a-trial-license) in the Hello World sample.
62
62
> In your code editor, open the Hello World sample located at [`/samples/hello-world.html`](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/samples/hello-world.html). Search for `"YOUR_LICENSE_KEY_HERE"` and replace it with your actual license key.
@@ -80,7 +80,7 @@ Once the server is running, open the application in a browser using the address
80
80
81
81
### Option 2: Use Precompiled Script
82
82
83
-
Since the DDS library files are published on [npm](https://www.npmjs.com/package/dynamsoft-document-scanner), it's easy to reference them from a CDN.
83
+
Since the **DDS** library files are published on [npm](https://www.npmjs.com/package/dynamsoft-document-scanner), it's easy to reference them from a CDN.
84
84
85
85
To use the precompiled script, simply include the following URL in a `<script>` tag:
86
86
```html
@@ -233,11 +233,11 @@ if (result?.correctedImageResult) {
233
233
234
234
## Custom Usage
235
235
236
-
This section builds on the Hello World sample to demonstrate how to configure DDS, typically by adjusting the `DocumentScannerConfig` object.
236
+
This section builds on the Hello World sample to demonstrate how to configure **DDS**, typically by adjusting the `DocumentScannerConfig` object.
237
237
238
238
### DocumentScannerConfig Overview
239
239
240
-
`DocumentScannerConfig` is the primary configuration object for customizing DDS. It includes the following properties:
240
+
`DocumentScannerConfig` is the primary configuration object for customizing **DDS**. It includes the following properties:
241
241
242
242
1. `license`: The license key.
243
243
2. `container`: The HTML container forthe entire workflow. If not specified (likein the Hello World Sample), one is created automatically.
@@ -257,9 +257,9 @@ This section builds on the Hello World sample to demonstrate how to configure DD
257
257
4. `onUpload`: Handler called when the user clicks the "Upload" button.
258
258
8. `templateFilePath`: Path to a Capture Vision template. Typically not needed as the default template is used.
259
259
9. `utilizedTemplateNames`: Template names for detection and correction. Typically not needed as the default template is used.
260
-
10. `engineResourcePaths`: Paths to extra resources such as `.wasm` engine files
260
+
10. `engineResourcePaths`: Paths to extra resources such as `.wasm` engine files.
261
261
262
-
We will discuss two main methods of customizing DDS with `DocumentScannerConfig`:
262
+
We will discuss two main methods of customizing **DDS** with `DocumentScannerConfig`:
263
263
264
264
1. **Workflow Customization**: Through container definitions.
265
265
2. **View-Based Customization**: Through configuration objects.
We previously covered `container` in [Workflow Customization](#workflow-customization), and changing `templateFilePath` is usually not required. Now, let's focus on `cameraEnhancerUIPath`.
363
363
364
-
> 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`.
364
+
> 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`.
365
365
366
366
By default, `cameraEnhancerUIPath` points to a file hosted on the jsDelivr CDN:
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.
370
370
371
371
##### Steps to Customize the UI for `DocumentScannerView`
372
-
1. Follow the instructions in [Build from Source](#option-1-build-from-source) to obtain the source files for DDS.
372
+
1. Follow the instructions in [Build from Source](#option-1-build-from-source) to obtain the source files for **DDS**.
373
373
2. Edit `/src/document-scanner.ui.html` to apply your customizations.
374
374
3. Build the project to generate the updated file in`/dist/document-scanner.ui.html`:
375
375
@@ -547,11 +547,13 @@ const documentScanner = new Dynamsoft.DocumentScanner({
547
547
548
548
### Self-Hosting Resource Files
549
549
550
-
By default, DDS relies on a CDN for resources such as `.wasm` engine files. If you require a **fully offline setup**, follow these steps:
551
-
> These steps are based on [Build from Source](#option-1-build-from-source), meaning that all DDS source files must be available on your local machine.
550
+
By default, **DDS** relies on a CDN for resources such as `.wasm` engine files. If you require a **fully offline setup**, follow these steps:
551
+
> These steps are based on [Build from Source](#option-1-build-from-source), meaning that all **DDS** source files must be available on your local machine.
552
552
553
553
#### Update the Engine Resource Paths and the UI Path:
554
554
555
+
> In this case, we reference local resource files that are copied during the build process. See [Modify the Build Script](#modify-the-build-script) for details. However, you can also reference your own copies, such as files hosted on your own server. If you need assistance, feel free to [contact us](https://www.dynamsoft.com/company/contact/).
556
+
555
557
```javascript
556
558
const documentScanner = new Dynamsoft.DocumentScanner({
557
559
license: "YOUR_LICENSE_KEY_HERE",
@@ -617,6 +619,6 @@ Now, all required files will be **served locally** without relying on a CDN.
617
619
618
620
## Next Step
619
621
620
-
DDS is a fully functional, ready-to-use document scanning SDK with built-in UI layouts. However, to extend its capabilities for multi-page and multi-document processing, as well as advanced editing features, we developed **Mobile Web Capture (MWC)**.
622
+
**DDS** is a fully functional, ready-to-use document scanning SDK with built-in UI layouts. However, to extend its capabilities for multi-page and multi-document processing, as well as advanced editing features, we developed **Mobile Web Capture (MWC)**.
621
623
622
624
Read on to learn how to use this web-based wrapper SDK in the [MWC Getting Started Guide](https://www.dynamsoft.com/mobile-web-capture/docs/guides/mobile-web-capture.html).
0 commit comments