From 1e904bd08e515ab6a6eca2ed2e98688107fa858a Mon Sep 17 00:00:00 2001 From: h-dynamsoft <172081603+dynamsoft-h@users.noreply.github.com> Date: Fri, 4 Jul 2025 16:05:26 -0700 Subject: [PATCH 1/4] fix: links and redirect rules (#110) --- README.md | 2 +- _config.yml | 4 ++-- code-gallery/mobile-web-capture/api.md | 2 +- .../mobile-web-capture/customization-guide.md | 6 ++--- code-gallery/mobile-web-capture/index.md | 6 ++--- release-notes/mobile-web-capture.md | 2 +- web.config | 22 +++++++++---------- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 955261e..b9e303f 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# Mobile-Web-Capture-Docs +# Mobile-Document-Scanner-Docs diff --git a/_config.yml b/_config.yml index f4387ca..86b029b 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,5 @@ -repository: dynamsoft-docs/mobile-web-capture-docs -repositoryUrl: https://github.com/dynamsoft-docs/mobile-web-capture-docs/blob/main +repository: dynamsoft-docs/mobile-document-scanner-docs +repositoryUrl: https://github.com/dynamsoft-docs/mobile-document-scanner-docs/blob/main docFullPath: https://www.dynamsoft.com/mobile-document-scanner/docs/web firstLevelUrl: /mobile-document-scanner/docs/web docHomePage: /mobile-document-scanner/docs/web/introduction/ diff --git a/code-gallery/mobile-web-capture/api.md b/code-gallery/mobile-web-capture/api.md index fed9cef..0950941 100644 --- a/code-gallery/mobile-web-capture/api.md +++ b/code-gallery/mobile-web-capture/api.md @@ -305,7 +305,7 @@ interface DocumentViewConfig { By default, the `DocumentView` displays the following when empty: -![Empty Document View](https://www.dynamsoft.com/mobile-web-capture/docs/assets/imgs/empty-document-view.png) +![Empty Document View]({{ site.assets }}imgs/empty-document-view.png) You can customize its appearance using the [`emptyContentConfig`](#emptycontentconfig) property. diff --git a/code-gallery/mobile-web-capture/customization-guide.md b/code-gallery/mobile-web-capture/customization-guide.md index ef9f141..cc0cd1d 100644 --- a/code-gallery/mobile-web-capture/customization-guide.md +++ b/code-gallery/mobile-web-capture/customization-guide.md @@ -11,7 +11,7 @@ description: Mobile Document Scanner JS Edition User Guide # How to Customize Mobile Web Capture > [!TIP] -> Prerequisites: read the [MWC Getting Started Guide]({{ site.guide }}mobile-web-capture/index.html) before proceeding. +> Prerequisites: read the [MWC Getting Started Guide]({{ site.code-gallery }}mobile-web-capture/index.html) before proceeding. This guide expands on the **Hello World** sample from the **MWC Getting Started Guide** and explores the available customization options. @@ -146,8 +146,8 @@ document.getElementById("initialFile").onchange = async function () { ``` API Reference: -- [`hasLaunched`]({{ site.code-gallery }}}mobile-web-capture/.html#haslaunched) -- [`dispose`]({{ site.api }}mobile-web-capture.html#dispose) +- [`hasLaunched`]({{ site.code-gallery }}}mobile-web-capture/api.html#haslaunched) +- [`dispose`]({{ site.code-gallery }}}mobile-web-capture/api.html#dispose) ### Scan Directly to Document diff --git a/code-gallery/mobile-web-capture/index.md b/code-gallery/mobile-web-capture/index.md index 1187174..46a64c7 100644 --- a/code-gallery/mobile-web-capture/index.md +++ b/code-gallery/mobile-web-capture/index.md @@ -186,7 +186,7 @@ Alternatively, the script can be referenced from a CDN: **MWC** wraps all its dependency scripts, so a **MWC** project only needs to include **MWC** itself as a single script. No additional dependency scripts are required. > [!IMPORTANT] -> Even if you reference the script locally, supporting resources like `.wasm` engine files are still loaded from the CDN at runtime. If you require a **fully offline setup**, follow the instructions in [Self-Hosting Resource File]({{ site.guide }}mobile-web-capture/customization-guide.html#self-hosting-resource-files). +> Even if you reference the script locally, supporting resources like `.wasm` engine files are still loaded from the CDN at runtime. If you require a **fully offline setup**, follow the instructions in [Self-Hosting Resource File]({{ site.code-gallery }}mobile-web-capture/customization-guide.html#self-hosting-resource-files). ### Instantiate MWC @@ -197,7 +197,7 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({ }); ``` -API Reference: [`MobileWebCapture()`](https://www.dynamsoft.com/mobile-web-capture/docs/api/mobile-web-capture.html#mobilewebcapture) +API Reference: [`MobileWebCapture()`]({{ site.code-gallery }}}mobile-web-capture/api.html#mobilewebcapture) This step creates the **MWC** UI, which, when launched, occupies the entire visible area of the browser window by default. If needed, you can specify a container to restrict the UI's size. For more details, refer to [Specify the UI Container]({{ site.code-gallery }}mobile-web-capture/customization-guide.html#example-1-specify-the-ui-container). @@ -211,7 +211,7 @@ const fileName = `New_Document_${Date.now().toString().slice(-5)}`; // Generates await mobileWebCapture.launch(fileName); ``` -API Reference: [`launch()`](https://www.dynamsoft.com/mobile-web-capture/docs/api/mobile-web-capture.html#launch) +API Reference: [`launch()`]({{ site.code-gallery }}}mobile-web-capture/api.html#launch) This step launches the UI, starting in **`DocumentView`**, where the user can begin building a document in two ways: diff --git a/release-notes/mobile-web-capture.md b/release-notes/mobile-web-capture.md index cb8c4ec..029eedf 100644 --- a/release-notes/mobile-web-capture.md +++ b/release-notes/mobile-web-capture.md @@ -19,7 +19,7 @@ The most notable improvement in this version is the pluggable scanner feature. T ### Features 1. Add Pluggable Scanner feature which integrates any scanner satisfying the following: - 1. Implements the [`MWCScanner`](https://www.dynamsoft.com/mobile-web-capture/docs/api/mobile-web-capture.html#mwcscanner) interface + 1. Implements the [`MWCScanner`]({{ site.code-gallery }}}mobile-web-capture/api.html#mwcscanner) interface 2. Implements a `launch()` method to return a result that includes: 1. `_imageData` with a `toBlob()` function 2. `imageData: true` diff --git a/web.config b/web.config index f807c1b..cded820 100644 --- a/web.config +++ b/web.config @@ -21,44 +21,44 @@ - + - + - + - + - + - + - + - + - + - + - + From 5dfc6c77aa0a890c57e25c2443386abec0340db6 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 16 Jul 2025 10:45:00 -0700 Subject: [PATCH 2/4] fix: MDS redirects --- web.config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web.config b/web.config index cded820..47145bc 100644 --- a/web.config +++ b/web.config @@ -40,25 +40,25 @@ - - + + - + - + - + - + From 2680f74435325c26850e371d79b0e308e6096c3e Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 16 Jul 2025 11:02:08 -0700 Subject: [PATCH 3/4] fix: use relative redirect links --- web.config | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web.config b/web.config index 47145bc..3715326 100644 --- a/web.config +++ b/web.config @@ -11,7 +11,7 @@ @@ -28,37 +28,37 @@ - + - + - + - + - + - + - + From 48799e9a794db97f3c518c5f4caa144235a67dda Mon Sep 17 00:00:00 2001 From: h-dynamsoft <172081603+dynamsoft-h@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:09:27 -0700 Subject: [PATCH 4/4] Staging (#111) * fix: use different link due to section loading order * fix: add more descriptions and links for self hosting --- api/index.md | 46 +++++++++++++++++++++++----------------------- guide/index.md | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/api/index.md b/api/index.md index d63326d..9c135c2 100644 --- a/api/index.md +++ b/api/index.md @@ -119,16 +119,16 @@ interface DocumentScannerConfig { #### 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`](#documentscannerconfig) | Configuration settings for the scanner view. | -| `resultViewConfig` | [`DocumentResultViewConfig`](#documentresultviewconfig) | Configuration settings for the result view. | -| `correctionViewConfig` | [`DocumentCorrectionViewConfig`](#documentcorrectionviewconfig) | Configuration settings for the correction view. | -| `templateFilePath` | `string` | The file path to the document template used for scanning. | -| `utilizedTemplateNames` | [`UtilizedTemplateNames`](#utilizedtemplatenames) | Specifies detection and correction templates. | -| `engineResourcePaths` | [`EngineResourcePaths`](#engineresourcepaths) | Paths to the necessary resources for the scanning engine. | +| 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`](#documentscannerconfig) | Configuration settings for the scanner view. | +| `resultViewConfig` | [`DocumentResultViewConfig`](#documentresultviewconfig) | Configuration settings for the result view. | +| `correctionViewConfig` | [`DocumentCorrectionViewConfig`](#documentcorrectionviewconfig) | Configuration settings for the correction view. | +| `templateFilePath` | `string` | The file path to the document template used for scanning. You may set custom paths to self-host the template, or host MDS fully offline - see [self-hosting resources]({{ site.guide }}index.html#self-host-resources) for details. | +| `utilizedTemplateNames` | [`UtilizedTemplateNames`](#utilizedtemplatenames) | Specifies detection and correction templates. You may set custom names to self-host resources, or host MDS fully offline - see [self-hosting resources]({{ site.guide }}index.html#self-host-resources) for details. | +| `engineResourcePaths` | [`EngineResourcePaths`](#engineresourcepaths) | Paths to the necessary resources for the scanning engine. You may set custom paths to self-host resources, or host MDS fully offline - see [self-hosting resources]({{ site.guide }}index.html#self-host-resources) for details. | #### Example ```typescript @@ -170,18 +170,18 @@ interface DocumentScannerViewConfig { #### Properties -| 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`](#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`](#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. | -| `showSubfooter` | `boolean` | Mode selector menu visibility. | -| `showPoweredByDynamsoft` | `boolean` | Visibility of the Dynamsoft branding message. | +| 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. You may set custom paths to self-host or customize the template, or host MDS fully offline - see [self-hosting resources]({{ site.guide }}index.html#self-host-resources) for details. | +| `container` | `HTMLElement` | The container element for the scanner view. | +| `utilizedTemplateNames` | `[`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`](#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. | +| `showSubfooter` | `boolean` | Mode selector menu visibility. | +| `showPoweredByDynamsoft` | `boolean` | Visibility of the Dynamsoft branding message. | #### Example @@ -425,7 +425,7 @@ interface UtilizedTemplateNames { ### `EngineResourcePaths` -Paths to extra resources such as `.wasm` engine files. The default paths point to CDNs and so may be left unset. You may set custom paths for the purpose of [self-hosting resources]({{ site.code-gallery }}mobile-web-capture/customization-guide.html#self-hosting-resource-files). +Paths to extra resources such as `.wasm` engine files. The default paths point to CDNs and so may be left unset. You may set custom paths to self-host resources, or host MDS fully offline - see [self-hosting resources]({{ site.guide }}index.html#self-host-resources) for details. #### Syntax diff --git a/guide/index.md b/guide/index.md index 127c685..d81c3a8 100644 --- a/guide/index.md +++ b/guide/index.md @@ -185,7 +185,7 @@ Alternatively, you can use other methods like `IIS` or `Apache` to serve the pro ### Self-Host Resources -By default, the MDS library (whether pre-compiled or self-compiled) fetches resource files (Dynamsoft `node` dependencies and an HTML UI template) from CDNs. Self-hosting library resources gives you full control over hosting your application. Rather than using CDNs to serve these resources, you can instead host these resources on your own servers to deliver to your users directly when they use your application. +By default, the MDS library (whether pre-compiled or self-compiled) fetches resource files (Dynamsoft `node` dependencies and an HTML UI template) from CDNs. Self-hosting library resources gives you full control over hosting your application. Rather than using CDNs to serve these resources, you can instead host these resources on your own servers to deliver to your users directly when they use your application. You can also use this option to host MDS fully offline by pointing to local resources. #### Download Resources @@ -339,7 +339,7 @@ Alternatively, the script can be referenced from a CDN: **MDS** wraps all its dependency scripts, so a **MDS** project only needs to include **MDS** itself as a single script. No additional dependency scripts are required. > [!WARNING] -> Even if you reference the script locally, supporting resources like `.wasm` engine files are still loaded from the CDN at runtime. If you require a **fully offline setup**, follow the instructions in [Self-Host Resources](#self-host-resources). +> Even if you reference the script locally, supporting resources like `.wasm` engine files are still loaded from the CDN at runtime. If you require a **fully offline setup**, follow the [quick start instructions to self-host resources](#quick-start). ### Instantiate MDS