From ee29e772c9d312e2f50ce773fddcfd071d9602b8 Mon Sep 17 00:00:00 2001
From: DMGithubPublisher
Date: Sat, 24 May 2025 06:13:11 +0800
Subject: [PATCH 1/3] update to internal commit 20965a62
chore: fix .gitignore
feat: GitHub preview CI workflow
chore: fix whitespace, EOF newline, and styling
fix: formatting
---
.github/workflows/main.yml | 18 +++--
.gitignore | 36 ++++++----
api/enums-mrz-scanner.md | 2 +-
api/index.md | 10 +--
api/mrz-scanner.md | 6 +-
codegallery/demo/index.md | 2 +-
codegallery/helloworld/index.md | 4 +-
codegallery/index.md | 2 +-
gettingstarted/add_dependency.md | 102 ++++++++++++++++------------
gettingstarted/license.md | 2 +-
gettingstarted/sys_requirement.md | 6 +-
guides/mrz-scanner-customization.md | 15 +++-
guides/mrz-scanner-static-image.md | 2 +-
guides/mrz-scanner.md | 44 +++++++-----
index.md | 14 ++--
introduction/index.md | 8 +--
releasenotes/index.md | 13 ++--
17 files changed, 173 insertions(+), 113 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index a944516..481c59f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -4,18 +4,18 @@ name: CI
# Controls when the workflow will run
on:
- # Triggers the workflow on push events but only for the main branch
+ # Triggers the workflow on push events to the main and preview branches
push:
- branches:
- - main
- #- preview
+ branches:
+ - main
+ - preview
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
- # This workflow contains jobs called "Build-Master"
+ # This workflow contains jobs called "Build-Main" and "Build-Preview"
Build-Main:
if: ${{ github.ref == 'refs/heads/main' }}
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-production.yml@main
@@ -23,3 +23,11 @@ jobs:
doc-repo: mrz-scanner-docs-js
doc-url: mrz-scanner/docs/web
secrets: inherit
+
+ Build-Preview:
+ if: ${{ github.ref == 'refs/heads/preview' }}
+ uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@main
+ with:
+ doc-repo: mrz-scanner-docs-js
+ doc-url: mrz-scanner/docs/web
+ secrets: inherit
diff --git a/.gitignore b/.gitignore
index 056ca9e..8ac9b07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,19 @@
.DS_Store
/.vs
-Gemfile
-Hide_Tree_Page.md
-sitemap.xml
-_includes/productNav/*
+
+# Layout templates
+_layouts/
+
+# Assets
+assets/font-face/
+assets/img-icon/
+assets/js/**
+!assets/js/setLatestVersion.js
+assets/scripts/
+assets/css/
+
+# Includes
+_includes/productNav/
_includes/auto-version-list.html
_includes/head.html
_includes/liquid_autoGenerateHistoryList.html
@@ -18,12 +28,14 @@ _includes/productNav_OLD.html
_includes/productNav.html
_includes/search-input.html
_includes/trialLicense.html
-_layouts/*
-_plugins/*
-assets/css/*
-assets/font-face/*
-assets/img-icon/*
-assets/js/*
-assets/scripts/*
-_site/*
+
+# Plugins
+_plugins/
+
+# Site resources
+_site/
+
+sitemap.xml
+Hide_Tree_Page.md
Gemfile.lock
+Gemfile
diff --git a/api/enums-mrz-scanner.md b/api/enums-mrz-scanner.md
index 8364be0..2048ce7 100644
--- a/api/enums-mrz-scanner.md
+++ b/api/enums-mrz-scanner.md
@@ -56,4 +56,4 @@ enum EnumMRZData {
DateOfBirth = "dateOfBirth",
DateOfExpiry = "dateOfExpiry",
}
-```
\ No newline at end of file
+```
diff --git a/api/index.md b/api/index.md
index 3861291..2099a51 100644
--- a/api/index.md
+++ b/api/index.md
@@ -20,7 +20,7 @@ Please read through the [**full API reference**](mrz-scanner.md), but you can fi
2. MRZScannerView - Represents the main view of the MRZ Scanner where the scanning operation occurs.
-3. MRZResultView - Displays the parsed MRZ result in human readable fields, along with a cropped image of the MRZ document.
+3. MRZResultView - Displays the parsed MRZ result in human readable fields, along with a cropped image of the MRZ document.
## Interfaces
@@ -32,11 +32,11 @@ Please read through the [**full API reference**](mrz-scanner.md), but you can fi
4. [MRZResultViewToolbarButtonsConfig](mrz-scanner.md#mrzresultviewtoolbarbuttonsconfig) - Configures the toolbar buttons of the **MRZResultView**.
-4. [MRZResult](mrz-scanner.md#mrzresult) - Represents a typical MRZ result along with all of the parsed fields that come with it.
+5. [MRZResult](mrz-scanner.md#mrzresult) - Represents a typical MRZ result along with all of the parsed fields that come with it.
-5. [MRZData](mrz-scanner.md#mrzdata) - Represents the parsed MRZ data that is part of the `MRZResult`.
+6. [MRZData](mrz-scanner.md#mrzdata) - Represents the parsed MRZ data that is part of the `MRZResult`.
-6. [MRZDate](mrz-scanner.md#mrzdate) - Represents a date in the MRZ fields - which is usually used for date of birth and the date of expiry.
+7. [MRZDate](mrz-scanner.md#mrzdate) - Represents a date in the MRZ fields - which is usually used for date of birth and the date of expiry.
## Enumerations
@@ -46,4 +46,4 @@ All of the enumerations can be found [**here**](enums-mrz-scanner.md). Here is a
2. [EnumResultStatus](enums-mrz-scanner.md#enumresultstatus) - An enumeration to represent the status of a MRZ result.
-3. [EnumMRZData](enums-mrz-scanner.md) - An enumeration to represent the different fields of the `MRZData` interface.
\ No newline at end of file
+3. [EnumMRZData](enums-mrz-scanner.md) - An enumeration to represent the different fields of the `MRZData` interface.
diff --git a/api/mrz-scanner.md b/api/mrz-scanner.md
index 0132831..0242798 100644
--- a/api/mrz-scanner.md
+++ b/api/mrz-scanner.md
@@ -115,7 +115,7 @@ To get the full picture on how to use *MRZScannerConfig*, please visit the [Cust
```ts
interface MRZScannerConfig {
license?: string; // license is absolutely required to be set at initialization
- container?: HTMLElement | string; //
+ container?: HTMLElement | string; //
// Resource/Template specific configuration
templateFilePath?: string;
@@ -152,7 +152,7 @@ const mrzConfig = {
license: "YOUR_LICENSE_KEY_HERE",
mrzFormatType: ["passport", "td1"], // set the MRTD formats to just passport and ID (TD1)
showResultView: false, // hide the final MRZResultView and go back to landing page once the MRZ result is in
- // engineResourcePaths typically is only assigned when using a framework like React/Angular/Vue where the resources are not in the same location as the script reference
+ // engineResourcePaths typically is only assigned when using a framework like React/Angular/Vue where the resources are not in the same location as the script reference
engineResourcePaths: {
std: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std/dist/",
dip: "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing/dist/",
@@ -504,4 +504,4 @@ type ResultStatus = {
#### Example
-Please see the [example of MRZResult](#example-8).
\ No newline at end of file
+Please see the [example of MRZResult](#example-8).
diff --git a/codegallery/demo/index.md b/codegallery/demo/index.md
index 9656ec9..a44f884 100644
--- a/codegallery/demo/index.md
+++ b/codegallery/demo/index.md
@@ -38,4 +38,4 @@ For the best demonstration of the full capabilities of the MRZ Scanner JavaScrip
If you do not wish to build the library from the source files, you can change the script reference at the `` of the code to the CDN link. To learn more about the ways you can include the library, please visit [User Guide - Quick Start]({{ site.guides }}mrz-scanner.html#quick-start---hello-world).
-To learn how you can further customize the MRZ Scanner in your code, please visit [Customizing the MRZ Scanner]({{ site.guides }}mrz-scanner-customization.html).
\ No newline at end of file
+To learn how you can further customize the MRZ Scanner in your code, please visit [Customizing the MRZ Scanner]({{ site.guides }}mrz-scanner-customization.html).
diff --git a/codegallery/helloworld/index.md b/codegallery/helloworld/index.md
index c5845ed..94d4ef3 100644
--- a/codegallery/helloworld/index.md
+++ b/codegallery/helloworld/index.md
@@ -36,7 +36,7 @@ Hello World represents the most basic implementation of the MRZ Scanner. One of
});
(async () => {
// Launch the scanner and wait for the result
- const result = await mrzScanner.launch({});
+ const result = await mrzScanner.launch();
})();
@@ -55,4 +55,4 @@ The simplest implementation means that the MRZ Scanner is initialized with the d
For a further breakdown of the Hello World code, please visit the [User Guide]({{ site.guides }}mrz-scanner.html).
-To learn how to customize the scanner to fit your needs, please visit [Customizing the MRZ Scanner]({{ site.guides }}mrz-scanner-customization.html).
\ No newline at end of file
+To learn how to customize the scanner to fit your needs, please visit [Customizing the MRZ Scanner]({{ site.guides }}mrz-scanner-customization.html).
diff --git a/codegallery/index.md b/codegallery/index.md
index 9b0896f..3fe6e68 100644
--- a/codegallery/index.md
+++ b/codegallery/index.md
@@ -50,4 +50,4 @@ The demo implementation adds a bit more colour and character to the Hello World
The full code of the Demo can be found [**here**](demo/index.md).
-For the best demonstration of the full capabilities of the MRZ Scanner JavaScript Edition, please visit the [official Dynamsoft MRZ Scanner JavaScript demo](https://demo.dynamsoft.com/mrz-scanner/).
\ No newline at end of file
+For the best demonstration of the full capabilities of the MRZ Scanner JavaScript Edition, please visit the [official Dynamsoft MRZ Scanner JavaScript demo](https://demo.dynamsoft.com/mrz-scanner/).
diff --git a/gettingstarted/add_dependency.md b/gettingstarted/add_dependency.md
index 91cedcb..a03e687 100644
--- a/gettingstarted/add_dependency.md
+++ b/gettingstarted/add_dependency.md
@@ -53,6 +53,7 @@ Besides using the CDN, you can also download the SDKs and host related files on
**Step 1** - Download the SDKs:
{% comment %}
+
- From the website
[Download the JavaScript ZIP package](https://www.dynamsoft.com/mobile-web-capture/downloads/)
@@ -69,7 +70,8 @@ Besides using the CDN, you can also download the SDKs and host related files on
yarn add dynamsoft-image-processing@2.2.10
yarn add dynamsoft-camera-enhancer@4.0.2
```
-{% endcomment %}
+
+ {% endcomment %}
- npm
@@ -84,31 +86,31 @@ Besides using the CDN, you can also download the SDKs and host related files on
npm install dynamsoft-camera-enhancer@4.0.2
```
-
-
**Step 2** - Include the SDKs
Depending on where you put them, you can typically include them like this:
{% comment %}
- ```html
-
-
-
-
-
-
- ```
+
+```html
+
+
+
+
+
+
+```
or
{% endcomment %}
- ```html
-
-
-
-
-
-
- ```
+
+```html
+
+
+
+
+
+
+```
**Step 3** Specify the location of the engine files(optinal)
@@ -116,31 +118,47 @@ If you would like to use the SDKs completely offline, please refer to [Use your
## Specify the location of the engine files
-This is usually only required with frameworks like Angular or React, etc. where the referenced JavaScript files such as cvr.js, ddn.js are compiled into another file, or hosting the engine files and using the SDKs completely offline. The purpose is to tell the SDK where to find the engine files (*.worker.js, *.wasm.js and *.wasm, etc.).
+This is usually only required with frameworks like Angular or React, etc. where the referenced JavaScript files such as cvr.js, ddn.js are compiled into another file, or hosting the engine files and using the SDKs completely offline. The purpose is to tell the SDK where to find the engine files (_.worker.js, _.wasm.js and \*.wasm, etc.).
### Use the jsDelivr CDN with frameworks like Angular or React, etc.
- ```typescript
- Dynamsoft.DDV.Core.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@2.0.0/dist/engine";
- Dynamsoft.Core.CoreModule.engineResourcePaths.core = "https://cdn.jsdelivr.net/npm/dynamsoft-core@3.2.10/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.license = "https://cdn.jsdelivr.net/npm/dynamsoft-license@3.2.10/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.ddn = "https://cdn.jsdelivr.net/npm/dynamsoft-document-normalizer@2.2.10/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.cvr = "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@2.2.10/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.std = "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std@1.2.0/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.dip = "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing@2.2.10/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.dce = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.2/dist/";
- ```
+
+```typescript
+Dynamsoft.DDV.Core.engineResourcePath =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@2.0.0/dist/engine";
+Dynamsoft.Core.CoreModule.engineResourcePaths.core =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-core@3.2.10/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.license =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-license@3.2.10/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.ddn =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-document-normalizer@2.2.10/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.cvr =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@2.2.10/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.std =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std@1.2.0/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.dip =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing@2.2.10/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.dce =
+ "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.2/dist/";
+```
### Use your own hosted engine files
- ```typescript
- //Feel free to change it to your own location of these files
- Dynamsoft.DDV.Core.engineResourcePath = "./node_modules/dynamsoft-document-viewer/dist/engine";
- Dynamsoft.Core.CoreModule.engineResourcePaths.core = "./node_modules/dynamsoft-core/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.license = "./node_modules/dynamsoft-license/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.ddn = "./node_modules/dynamsoft-document-normalizer/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.cvr = "./node_modules/dynamsoft-capture-vision-router/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.std = "./node_modules/dynamsoft-capture-vision-std/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.dip = "./node_modules/dynamsoft-image-processing/dist/";
- Dynamsoft.Core.CoreModule.engineResourcePaths.dce = "./node_modules/dynamsoft-camera-enhancer/dist/";
- ```
-
\ No newline at end of file
+```typescript
+//Feel free to change it to your own location of these files
+Dynamsoft.DDV.Core.engineResourcePath =
+ "./node_modules/dynamsoft-document-viewer/dist/engine";
+Dynamsoft.Core.CoreModule.engineResourcePaths.core =
+ "./node_modules/dynamsoft-core/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.license =
+ "./node_modules/dynamsoft-license/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.ddn =
+ "./node_modules/dynamsoft-document-normalizer/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.cvr =
+ "./node_modules/dynamsoft-capture-vision-router/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.std =
+ "./node_modules/dynamsoft-capture-vision-std/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.dip =
+ "./node_modules/dynamsoft-image-processing/dist/";
+Dynamsoft.Core.CoreModule.engineResourcePaths.dce =
+ "./node_modules/dynamsoft-camera-enhancer/dist/";
+```
diff --git a/gettingstarted/license.md b/gettingstarted/license.md
index fe79929..96230f1 100644
--- a/gettingstarted/license.md
+++ b/gettingstarted/license.md
@@ -29,4 +29,4 @@ The following code snippet is using the public trial license to initialize the l
const mrzScanner = new Dynamsoft.MRZScanner({
license: "YOUR_LICENSE_KEY_HERE",
});
-```
\ No newline at end of file
+```
diff --git a/gettingstarted/sys_requirement.md b/gettingstarted/sys_requirement.md
index 2f63797..2c0c2d0 100644
--- a/gettingstarted/sys_requirement.md
+++ b/gettingstarted/sys_requirement.md
@@ -17,10 +17,10 @@ The MRZ Scanner JavaScript Edition solution is built upon the JavaScript edition
1. **Secure context (HTTPS deployment)**
When deploying your application / website for production, make sure to serve it via a secure HTTPS connection. This is required for two reasons
-
+
- Access to the camera video stream is only granted in a security context. Most browsers impose this restriction.
> Some browsers like Chrome may grant the access for `http://127.0.0.1` and `http://localhost` or even for pages opened directly from the local disk (`file:///...`). This can be helpful for temporary development and testing.
-
+
- Dynamsoft licenses require a secure context to work, unless a special offline license is used.
2. **`WebAssembly`, `Blob`, `URL`/`createObjectURL`, `Web Workers`**
@@ -47,4 +47,4 @@ Apart from the browsers, the operating systems may impose some limitations of th
## References
- [Dynamsoft Label Recognizer - System Requirements](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/user-guide/mrz-scanner.html#system-requirements)
-- [Dynamsoft Code Parser - System Requirements](https://www.dynamsoft.com/code-parser/docs/web/programming/javascript/user-guide/#system-requirements)
\ No newline at end of file
+- [Dynamsoft Code Parser - System Requirements](https://www.dynamsoft.com/code-parser/docs/web/programming/javascript/user-guide/#system-requirements)
diff --git a/guides/mrz-scanner-customization.md b/guides/mrz-scanner-customization.md
index 5041f88..5359a61 100644
--- a/guides/mrz-scanner-customization.md
+++ b/guides/mrz-scanner-customization.md
@@ -15,6 +15,17 @@ permalink: /guides/mrz-scanner-customization.html
>
>Before going into the ways that you can customize the MRZ Scanner, please read the [MRZ Scanner JavaScript Edition User Guide]({{ site.guides }}mrz-scanner.html).
+## Quick Links
+
+- [Setting Available MRTD formats](#setting-available-mrtd-formats)
+- [Hiding the Result View](#hiding-the-result-view)
+- [Changing the Scan Guide Frame](#changing-the-scan-guide-frame)
+- [Reading Static Images and PDFs using the MRZ Scanner](#reading-static-images-and-pdfs-using-the-mrz-scanner)
+- [Configuring the `onDone` Callback](#configuring-the-ondone-callback)
+- [Enable Result Editing](#enable-result-editing)
+
+## Introduction
+
This guide expands on the User Guide that explored the MRZ Scanner Hello World sample project. Here we explore ways to customize the UI as well as the performance of the MRZ Scanner. We will walk through the three main configuration interfaces - [**`MRZScannerConfig`**]({{ site.api }}mrz-scanner.html#mrzscannerconfig), [**`MRZScannerViewConfig`**]({{ site.api }}mrz-scanner.html#mrzscannerviewconfig), and [**`MRZResultViewConfig`**]({{ site.api }}mrz-scanner.html#mrzresultviewconfig). These configuration interfaces make customizing the MRZ Scanner as easy as adding or changing a few properties in the instance constructor. Every sample is a variation on the previous Hello World sample with a few additional properties defined in the configuration interfaces, and so we only show the differing portion rather than all the code.
## `MRZScannerConfig` Overview
@@ -146,9 +157,9 @@ The `MRZScannerView` provides a guide frame for each of the three MRTD formats.
Please contact the [Dynamsoft Support Team](https://www.dynamsoft.com/company/contact/) for any further inquiries, or to customize the frame guide selection logic.
-### Reading Static Images using the MRZ Scanner
+### Reading Static Images and PDFs using the MRZ Scanner
-Starting from v2.1 of the MRZ Scanner, the library is now able to read MRZs **directly** from static images and PDFs. To support this, the MRZScannerViewConfig will need to be configured to support that, especially for PDFs.
+Starting from **v2.1** of the MRZ Scanner, the library is now able to read MRZs **directly** from static images and PDFs. To support this, the MRZScannerViewConfig will need to be configured to support that, especially for PDFs.
To learn more on how to create a web application that supports static image/PDF reading using the MRZ Scanner, please refer to this [guide]({{ site.guides }}mrz-scanner-static-image.html). Furthermore, please refer to the full File Input Sample that the previously linked guide walks you through.
diff --git a/guides/mrz-scanner-static-image.md b/guides/mrz-scanner-static-image.md
index 77d2950..9e0e84e 100644
--- a/guides/mrz-scanner-static-image.md
+++ b/guides/mrz-scanner-static-image.md
@@ -35,7 +35,7 @@ The first step in making the sample is to define the script references and the H
Dynamsoft MRZ Scanner - Use File Input
-
+
diff --git a/guides/mrz-scanner.md b/guides/mrz-scanner.md
index 98211b2..bb479e3 100644
--- a/guides/mrz-scanner.md
+++ b/guides/mrz-scanner.md
@@ -91,7 +91,7 @@ Below is the complete Hello World sample page that uses the precompiled script s
});
(async () => {
// Launch the scanner and wait for the result
- const result = await mrzScanner.launch({});
+ const result = await mrzScanner.launch();
})();
+ Dynamsoft MRZ Scanner
+
+
+