From 5b4b764b8c497f87f9677a84c21e9d4b405fbdc6 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 09:59:36 -0700 Subject: [PATCH 01/28] chore: remove VS Code config --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9e26dfe..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file From 330cae6f7f06ced083f42b93e974a5546629855f Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:05:14 -0700 Subject: [PATCH 02/28] chore: update .gitignore for local builds --- .gitignore | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f14b74d..b0bd1b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,38 @@ -################################################################################ -# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 -################################################################################ +# Layout templates +_layouts/** -/.vs +# Assets +assets/font-face/** +assets/img-icon/** +assets/js/** +assets/scripts/** +assets/css/** + +# Includes +_includes/productNav/* +!_/includes/productNav/mwcNav.html +_includes/auto-version-list.html +_includes/head.html +_includes/liquid_autoGenerateHistoryList.html +_includes/liquid_breadcrumb.html +_includes/liquid_generateFullTree.html +_includes/liquid_searchVersionTreeFile.html +_includes/livehelp.html +_includes/main-page-head.html +_includes/page_footer.html +_includes/page_header.html +_includes/productNav_OLD.html +_includes/productNav.html +_includes/search-input.html +_includes/trialLicense.html + +# Plugins +_plugins/** + +# Site resources +_site/** + +sitemap.xml +Hide_Tree_Page.md +Gemfile.lock +Gemfile From 2cfe6f21d4804c1e1a0ab2a5ab6c6090ef2f4862 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 11:00:25 -0700 Subject: [PATCH 03/28] chore: fix .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b0bd1b7..927c105 100644 --- a/.gitignore +++ b/.gitignore @@ -5,12 +5,12 @@ _layouts/** assets/font-face/** assets/img-icon/** assets/js/** +!assets/js/setLatestVersion.js assets/scripts/** assets/css/** # Includes _includes/productNav/* -!_/includes/productNav/mwcNav.html _includes/auto-version-list.html _includes/head.html _includes/liquid_autoGenerateHistoryList.html From 315600ba832ca293b138423cd587961be98f6a1c Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:28:57 -0700 Subject: [PATCH 04/28] chore: fix .gitignore --- .gitignore | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 927c105..7597199 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,16 @@ # Layout templates -_layouts/** +_layouts/ # Assets -assets/font-face/** -assets/img-icon/** -assets/js/** +assets/font-face/ +assets/img-icon/ +assets/js/ !assets/js/setLatestVersion.js -assets/scripts/** -assets/css/** +assets/scripts/ +assets/css/ # Includes -_includes/productNav/* +_includes/productNav/ _includes/auto-version-list.html _includes/head.html _includes/liquid_autoGenerateHistoryList.html @@ -27,10 +27,10 @@ _includes/search-input.html _includes/trialLicense.html # Plugins -_plugins/** +_plugins/ # Site resources -_site/** +_site/ sitemap.xml Hide_Tree_Page.md From 6c1ef94e28d661425e4ebd1b74206966e8961b9d Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:33:16 -0700 Subject: [PATCH 05/28] remove ignored templates --- _layouts/default-layout-OLD.html | 100 ----------- _layouts/home-page.html | 50 ------ _layouts/search-page-OLD.html | 284 ------------------------------- 3 files changed, 434 deletions(-) delete mode 100644 _layouts/default-layout-OLD.html delete mode 100644 _layouts/home-page.html delete mode 100644 _layouts/search-page-OLD.html diff --git a/_layouts/default-layout-OLD.html b/_layouts/default-layout-OLD.html deleted file mode 100644 index 2495393..0000000 --- a/_layouts/default-layout-OLD.html +++ /dev/null @@ -1,100 +0,0 @@ - - - -{%- include head.html -%} -{%- assign noTitleIndex = "" -%} -{%- if page.noTitleIndex or page.url contains 'release-notes' -%} - {%- assign noTitleIndex = "noTitleIndex" -%} -{%- endif -%} - - - {% assign url = 'https://www.dynamsoft.com/shared/head/' %} - {% remote_include {{ url }} %} - - {%- include mwcNav.html -%} -
Table of contents
-
-
-
-
- {%- include main-page-head.html -%} -
-
-
- {{ content }} -
-
-
-

Is this page helpful?

- YesYes - NoNo -
-
- {%- if page.needAutoGenerateSidebar -%} -

In this article:

-
- {%- endif -%} -
-
- -
- -
-
-
-
-
- {%- include liquid_autoGenerateHistoryList.html -%} - {%- include auto-version-list.html -%} -
-
-
- -
- {%- include page_footer.html -%} -
- - - - - {%- include livehelp.html -%} - - - - - - - - - - - diff --git a/_layouts/home-page.html b/_layouts/home-page.html deleted file mode 100644 index 138adf8..0000000 --- a/_layouts/home-page.html +++ /dev/null @@ -1,50 +0,0 @@ - - - -{%- include head.html -%} - - - - - {% assign url = 'https://www.dynamsoft.com/shared/head/' %} - {% remote_include {{ url }} %} - -
-
-
- - {{ content }} -
-
-
-
- {%- include page_footer.html -%} -
- - - - - - - diff --git a/_layouts/search-page-OLD.html b/_layouts/search-page-OLD.html deleted file mode 100644 index 9bd9dcb..0000000 --- a/_layouts/search-page-OLD.html +++ /dev/null @@ -1,284 +0,0 @@ - - - -{%- include head.html -%} - - - - {% assign url = 'https://www.dynamsoft.com/shared/head/' %} - {% remote_include {{ url }} %} - -
-
-
-
-
- -
-
-
-
-
-
- -
Documentation
-
-
-
-
-
-
Table of contents
-
-
-
-
-
-
-
-

Search

- - -
-
-
- -
-
-
-
-
- {%- include page_footer.html -%} -
- - - - - {%- if page.needAutoGenerateSidebar -%} - {%- unless page.needGenerateH3Content -%} - - {%- else -%} - - {%- endunless -%} - {%- else -%} - - {%- endif -%} - - - - {%- include livehelp.html -%} - - - \ No newline at end of file From 994f6a3dc8c8a69130c42847229f63617fcc1b31 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:57:25 -0700 Subject: [PATCH 06/28] chore: fix whitespace and EOF newline --- .github/workflows/full-site-build.yml | 12 +-- .github/workflows/main.yml | 8 +- README.md | 2 +- _config.yml | 90 +++++++++--------- _data/full_tree.yml | 2 +- _data/product_version.yml | 2 +- _includes/sidelist-api.html | 2 +- _includes/sidelist-apis-v2.0.html | 2 +- _includes/sidelist-codegallery-v1.1.html | 2 +- _includes/sidelist-codegallery-v2.0.html | 2 +- _includes/sidelist-codegallery.html | 2 +- _includes/sidelist-full-tree-v2.0.html | 2 +- _includes/sidelist-full-tree.html | 2 +- _includes/sidelist-gettingstarted-v1.1.html | 6 +- _includes/sidelist-gettingstarted-v2.0.html | 6 +- _includes/sidelist-gettingstarted.html | 6 +- _includes/sidelist-guides.html | 8 +- _includes/sidelist-introduction-v2.0.html | 2 +- _includes/sidelist-introduction.html | 2 +- _includes/sidelist-releasenotes.html | 2 +- assets/js/setLatestVersion.js | 2 +- codegallery/demo/index.md | 2 +- ...re-continuously-edit-result-images-v1.1.md | 2 +- .../capture-single-page-and-then-crop.md | 12 +-- .../complete-doc-capturing-workflow.md | 70 +++++++------- .../detect-boundaries-on-existing-image.md | 12 +-- ...tect-boundaries-on-existing-images-v1.1.md | 14 +-- codegallery/usecase/index-v1.1.md | 6 +- codegallery/usecase/index.md | 4 +- ...ly-complete-doc-capturing-workflow-v1.1.md | 68 +++++++------- .../review-adjust-detected-boundaries-v1.1.md | 12 +-- faq.md | 1 - gettingstarted/adddependency-v1.1.md | 4 +- gettingstarted/adddependency.md | 1 - gettingstarted/helloworld-continuousmode.md | 58 ++++++------ gettingstarted/helloworld-singlepage.md | 2 +- gettingstarted/helloworld-v1.1.md | 50 +++++----- gettingstarted/helloworld.md | 50 +++++----- gettingstarted/license.md | 2 +- gettingstarted/systemrequirement.md | 6 +- guides/document-scanner-v3.0.md | 20 ++-- guides/document-scanner.md | 22 ++--- .../mobile-web-capture-customization-v3.0.md | 26 +++--- guides/mobile-web-capture-customization.md | 26 +++--- guides/mobile-web-capture-v3.0.md | 4 +- guides/mobile-web-capture.md | 2 +- index-v1.1.md | 2 +- index.md | 2 +- introduction/index-v3.0.md | 2 +- introduction/index.md | 2 +- release-notes/mobile-web-capture.md | 6 +- search.md | 2 +- web.config | 92 +++++++++---------- 53 files changed, 368 insertions(+), 380 deletions(-) diff --git a/.github/workflows/full-site-build.yml b/.github/workflows/full-site-build.yml index a491315..306588f 100644 --- a/.github/workflows/full-site-build.yml +++ b/.github/workflows/full-site-build.yml @@ -43,10 +43,9 @@ jobs: server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }} username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }} password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }} - port: 21 + port: 21 local-dir: /home/ubuntu/MWCDoc/_site/ - server-dir: /www.dynamsoft.com/mobile-web-capture/docs/ - + server-dir: /www.dynamsoft.com/mobile-web-capture/docs/ Build-Preview: if: ${{ github.ref == 'refs/heads/preview' }} @@ -57,8 +56,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it #- uses: actions/checkout@v2 - - + # Runs a set of commands using the runners shell - name: Build the site run: | @@ -72,7 +70,6 @@ jobs: sed -i -e "1,3s/blob\/master$/blob\/preview/" \ -e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/MWCDocPreview/_config.yml cd MWCDocPreview && bundle exec jekyll build - - name: Sync files uses: SamKirkland/FTP-Deploy-Action@4.3.0 @@ -80,7 +77,6 @@ jobs: server: ${{ secrets.FTP_TEST_SITE_SERVER }} username: ${{ secrets.FTP_TEST_SITE_USER }} password: ${{ secrets.FTP_TEST_SITE_PASSWORD }} - port: 7500 + port: 7500 local-dir: /home/ubuntu/MWCDocPreview/_site/ server-dir: /www.dynamsoft.com/mobile-web-capture/docs/ - diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d2ad81..9137b0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,9 +6,9 @@ name: CI on: # Triggers the workflow on push events but only for the master branch push: - branches: - - main - # - preview + branches: + - main + # - preview # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -30,4 +30,4 @@ jobs: with: doc-repo: mobile-web-capture-docs doc-url: mobile-web-capture/docs/ - secrets: inherit \ No newline at end of file + secrets: inherit diff --git a/README.md b/README.md index ca56222..955261e 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# Mobile-Web-Capture-Docs \ No newline at end of file +# Mobile-Web-Capture-Docs diff --git a/_config.yml b/_config.yml index 1394a58..2dded18 100644 --- a/_config.yml +++ b/_config.yml @@ -1,46 +1,44 @@ -repository: dynamsoft-docs/mobile-web-capture-docs -repositoryUrl: https://github.com/dynamsoft-docs/mobile-web-capture-docs/blob/main -docFullPath: https://www.dynamsoft.com/mobile-web-capture/docs -firstLevelUrl: /mobile-web-capture/docs -docHomePage: /mobile-web-capture/docs/introduction/ - -introduction: /mobile-web-capture/docs/introduction/ -gettingstarted: /mobile-web-capture/docs/gettingstarted/ -codegallery: /mobile-web-capture/docs/codegallery/ -api: /mobile-web-capture/docs/api/ - -guides: /mobile-web-capture/docs/guides/ - - -releasenotes: /mobile-web-capture/docs/releasenotes/ - -useVersionTree: true - -assets: /mobile-web-capture/docs/assets/ -edit_icon: /mobile-web-capture/docs/assets/img-icon/edit-icon.png -smile_icon: /mobile-web-capture/docs/assets/img-icon/icon-smile.png -sad_icon: /mobile-web-capture/docs/assets/img-icon/icon-sad.png - -baseurl: "/mobile-web-capture/docs" - -download: "/mobile-web-capture/downloads/" - -plugins: - - jemoji - - jekyll-sitemap - - -defaults: - - scope: - path: "" - values: - layout: "default-layout" - noTitleIndex: true - needAutoGenerateSidebar: true - needGenerateH3Content: true - - scope: - path: "Hide_Tree_Page.html" - values: - sitemap: false - -url: "https://www.dynamsoft.com" # sitemap root +repository: dynamsoft-docs/mobile-web-capture-docs +repositoryUrl: https://github.com/dynamsoft-docs/mobile-web-capture-docs/blob/main +docFullPath: https://www.dynamsoft.com/mobile-web-capture/docs +firstLevelUrl: /mobile-web-capture/docs +docHomePage: /mobile-web-capture/docs/introduction/ + +introduction: /mobile-web-capture/docs/introduction/ +gettingstarted: /mobile-web-capture/docs/gettingstarted/ +codegallery: /mobile-web-capture/docs/codegallery/ +api: /mobile-web-capture/docs/api/ + +guides: /mobile-web-capture/docs/guides/ + +releasenotes: /mobile-web-capture/docs/releasenotes/ + +useVersionTree: true + +assets: /mobile-web-capture/docs/assets/ +edit_icon: /mobile-web-capture/docs/assets/img-icon/edit-icon.png +smile_icon: /mobile-web-capture/docs/assets/img-icon/icon-smile.png +sad_icon: /mobile-web-capture/docs/assets/img-icon/icon-sad.png + +baseurl: "/mobile-web-capture/docs" + +download: "/mobile-web-capture/downloads/" + +plugins: + - jemoji + - jekyll-sitemap + +defaults: + - scope: + path: "" + values: + layout: "default-layout" + noTitleIndex: true + needAutoGenerateSidebar: true + needGenerateH3Content: true + - scope: + path: "Hide_Tree_Page.html" + values: + sitemap: false + +url: "https://www.dynamsoft.com" # sitemap root diff --git a/_data/full_tree.yml b/_data/full_tree.yml index c87f50e..193fca0 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -6,4 +6,4 @@ tree_file_list: - 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 + - sidelist-introduction-v2.0.html diff --git a/_data/product_version.yml b/_data/product_version.yml index 0e57e44..115417f 100644 --- a/_data/product_version.yml +++ b/_data/product_version.yml @@ -6,4 +6,4 @@ version_info_list: - value: 2.0 - value: 1.x child: - - 1.1 \ No newline at end of file + - 1.1 diff --git a/_includes/sidelist-api.html b/_includes/sidelist-api.html index 075348e..f146fc0 100644 --- a/_includes/sidelist-api.html +++ b/_includes/sidelist-api.html @@ -3,4 +3,4 @@
  • Document Scanner
  • Mobile Web Capture
  • - \ No newline at end of file + diff --git a/_includes/sidelist-apis-v2.0.html b/_includes/sidelist-apis-v2.0.html index f1591ed..1f23c0c 100644 --- a/_includes/sidelist-apis-v2.0.html +++ b/_includes/sidelist-apis-v2.0.html @@ -1 +1 @@ -
  • Related API Reference
  • \ No newline at end of file +
  • Related API Reference
  • diff --git a/_includes/sidelist-codegallery-v1.1.html b/_includes/sidelist-codegallery-v1.1.html index 5b76e6d..9294268 100644 --- a/_includes/sidelist-codegallery-v1.1.html +++ b/_includes/sidelist-codegallery-v1.1.html @@ -10,4 +10,4 @@ {% comment %}
  • Demo
  • {% endcomment %} - \ No newline at end of file + diff --git a/_includes/sidelist-codegallery-v2.0.html b/_includes/sidelist-codegallery-v2.0.html index 96d924d..7f51986 100644 --- a/_includes/sidelist-codegallery-v2.0.html +++ b/_includes/sidelist-codegallery-v2.0.html @@ -9,4 +9,4 @@ {% comment %}
  • Demo
  • {% endcomment %} - \ No newline at end of file + diff --git a/_includes/sidelist-codegallery.html b/_includes/sidelist-codegallery.html index 96d924d..7f51986 100644 --- a/_includes/sidelist-codegallery.html +++ b/_includes/sidelist-codegallery.html @@ -9,4 +9,4 @@ {% comment %}
  • Demo
  • {% endcomment %} - \ No newline at end of file + diff --git a/_includes/sidelist-full-tree-v2.0.html b/_includes/sidelist-full-tree-v2.0.html index 91a6d4c..334e3e9 100644 --- a/_includes/sidelist-full-tree-v2.0.html +++ b/_includes/sidelist-full-tree-v2.0.html @@ -2,4 +2,4 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-gettingstarted.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-codegallery.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-apis.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} \ No newline at end of file +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} diff --git a/_includes/sidelist-full-tree.html b/_includes/sidelist-full-tree.html index cd1476b..3dac988 100644 --- a/_includes/sidelist-full-tree.html +++ b/_includes/sidelist-full-tree.html @@ -4,4 +4,4 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-api.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} \ No newline at end of file +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} diff --git a/_includes/sidelist-gettingstarted-v1.1.html b/_includes/sidelist-gettingstarted-v1.1.html index 0f92aad..2a2cd7d 100644 --- a/_includes/sidelist-gettingstarted-v1.1.html +++ b/_includes/sidelist-gettingstarted-v1.1.html @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/_includes/sidelist-gettingstarted-v2.0.html b/_includes/sidelist-gettingstarted-v2.0.html index 48e419e..429e944 100644 --- a/_includes/sidelist-gettingstarted-v2.0.html +++ b/_includes/sidelist-gettingstarted-v2.0.html @@ -2,8 +2,8 @@ - \ No newline at end of file + diff --git a/_includes/sidelist-gettingstarted.html b/_includes/sidelist-gettingstarted.html index 849026d..a663975 100644 --- a/_includes/sidelist-gettingstarted.html +++ b/_includes/sidelist-gettingstarted.html @@ -2,8 +2,8 @@ - \ No newline at end of file + diff --git a/_includes/sidelist-guides.html b/_includes/sidelist-guides.html index 82f7c60..a0d1957 100644 --- a/_includes/sidelist-guides.html +++ b/_includes/sidelist-guides.html @@ -1,7 +1,7 @@
  • Developer Guides -
  • \ No newline at end of file + diff --git a/_includes/sidelist-introduction-v2.0.html b/_includes/sidelist-introduction-v2.0.html index 9ec7e76..d85ab5c 100644 --- a/_includes/sidelist-introduction-v2.0.html +++ b/_includes/sidelist-introduction-v2.0.html @@ -1 +1 @@ -
  • Introduction
  • \ No newline at end of file +
  • Introduction
  • diff --git a/_includes/sidelist-introduction.html b/_includes/sidelist-introduction.html index 9ec7e76..d85ab5c 100644 --- a/_includes/sidelist-introduction.html +++ b/_includes/sidelist-introduction.html @@ -1 +1 @@ -
  • Introduction
  • \ No newline at end of file +
  • Introduction
  • diff --git a/_includes/sidelist-releasenotes.html b/_includes/sidelist-releasenotes.html index c731573..0543afb 100644 --- a/_includes/sidelist-releasenotes.html +++ b/_includes/sidelist-releasenotes.html @@ -1 +1 @@ -
  • Release Notes
  • \ No newline at end of file +
  • Release Notes
  • diff --git a/assets/js/setLatestVersion.js b/assets/js/setLatestVersion.js index bd3ea28..6aec0fd 100644 --- a/assets/js/setLatestVersion.js +++ b/assets/js/setLatestVersion.js @@ -2,4 +2,4 @@ var versionNoteLatestVersion = "18.3" $(function() { $("#versionNoteLatestVersion").text(" (" + versionNoteLatestVersion + ")") -}) \ No newline at end of file +}) diff --git a/codegallery/demo/index.md b/codegallery/demo/index.md index 4cee61f..0e7d08d 100644 --- a/codegallery/demo/index.md +++ b/codegallery/demo/index.md @@ -10,4 +10,4 @@ description: Mobile Web Capture Documentation Demo permalink: /codegallery/demo/index.html --- -# Demo \ No newline at end of file +# Demo diff --git a/codegallery/usecase/capture-continuously-edit-result-images-v1.1.md b/codegallery/usecase/capture-continuously-edit-result-images-v1.1.md index fbc516e..6ad3b99 100644 --- a/codegallery/usecase/capture-continuously-edit-result-images-v1.1.md +++ b/codegallery/usecase/capture-continuously-edit-result-images-v1.1.md @@ -583,4 +583,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/codegallery/usecase/capture-single-page-and-then-crop.md b/codegallery/usecase/capture-single-page-and-then-crop.md index e26bd85..732254a 100644 --- a/codegallery/usecase/capture-single-page-and-then-crop.md +++ b/codegallery/usecase/capture-single-page-and-then-crop.md @@ -34,7 +34,7 @@ In this sample, we would like to achieve the workflow as below. type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event to go back to the capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -241,7 +241,7 @@ document.getElementById("restore").onclick = () => { } }); // Play video stream in 1080P - captureViewer.play({ + captureViewer.play({ resolution: [1920,1080], fill: true }); @@ -259,7 +259,7 @@ document.getElementById("restore").onclick = () => { type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -316,7 +316,7 @@ document.getElementById("restore").onclick = () => { viewerConfig:{ scrollToLatest: true, } - }); + }); // Register the event for "Back" button perspectiveViewer.on("backToCaptureViewer",() => { @@ -331,7 +331,7 @@ document.getElementById("restore").onclick = () => { if(count === 0) { switchViewer(true,false) } - }); + }); // Register the event for "PerspectiveAll" button to display the result image perspectiveViewer.on("done", async () => { @@ -387,4 +387,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/codegallery/usecase/complete-doc-capturing-workflow.md b/codegallery/usecase/complete-doc-capturing-workflow.md index 8471d7f..41bcdda 100644 --- a/codegallery/usecase/complete-doc-capturing-workflow.md +++ b/codegallery/usecase/complete-doc-capturing-workflow.md @@ -130,12 +130,12 @@ export async function initDocDetectModule(DDV, CVR) { success: false }); }; - + let width = image.width; let height = image.height; let ratio = 1; let data; - + if (height > 720) { ratio = height / 720; height = 720; @@ -144,8 +144,8 @@ export async function initDocDetectModule(DDV, CVR) { } else { data = image.data.slice(0); } - - + + // Define DSImage according to the usage of DDN const DSImage = { bytes: new Uint8Array(data), @@ -154,33 +154,33 @@ export async function initDocDetectModule(DDV, CVR) { stride: width * 4, //RGBA format: 10 // IPF_ABGR_8888 }; - + // Use DDN normalized module const results = await router.capture(DSImage, 'detect-document-boundaries'); - + // Filter the results and generate corresponding return values if (results.items.length <= 0) { return Promise.resolve({ success: false }); }; - + const quad = []; results.items[0].location.points.forEach((p) => { quad.push([p.x * ratio, p.y * ratio]); }); - + const detectResult = this.processDetectResult({ location: quad, width: image.width, height: image.height, config }); - + return Promise.resolve(detectResult); } } - + DDV.setProcessingHandler('documentBoundariesDetect', new DDNNormalizeHandler()) } @@ -197,42 +197,42 @@ function compress( } catch (error) { source = new Uint8Array(imageData); } - + const scaleW = newWidth / imageWidth; const scaleH = newHeight / imageHeight; const targetSize = newWidth * newHeight * 4; const targetMemory = new ArrayBuffer(targetSize); let distData = null; - + try { distData = new Uint8ClampedArray(targetMemory, 0, targetSize); } catch (error) { distData = new Uint8Array(targetMemory, 0, targetSize); } - + const filter = (distCol, distRow) => { const srcCol = Math.min(imageWidth - 1, distCol / scaleW); const srcRow = Math.min(imageHeight - 1, distRow / scaleH); const intCol = Math.floor(srcCol); const intRow = Math.floor(srcRow); - + let distI = (distRow * newWidth) + distCol; let srcI = (intRow * imageWidth) + intCol; - + distI *= 4; srcI *= 4; - + for (let j = 0; j <= 3; j += 1) { distData[distI + j] = source[srcI + j]; } }; - + for (let col = 0; col < newWidth; col += 1) { for (let row = 0; row < newHeight; row += 1) { filter(col, row); } } - + return distData; } ``` @@ -280,8 +280,8 @@ To capture images, we need to create a capture viewer. // Bind click event to "ImagePreview" element // The event will be registered later type: Dynamsoft.DDV.Elements.ImagePreview, - events: { - click: "showPerspectiveViewer" + events: { + click: "showPerspectiveViewer" }, }, Dynamsoft.DDV.Elements.CameraConvert, @@ -290,7 +290,7 @@ To capture images, we need to create a capture viewer. ], }; ``` - + - Create the viewer by using the new `UiConfig`. ```javascript @@ -324,7 +324,7 @@ To capture images, we need to create a capture viewer. type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event to go back to capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -383,7 +383,7 @@ To capture images, we need to create a capture viewer. ## Create an edit viewer -To review and edit the captured images, we create an edit viewer. +To review and edit the captured images, we create an edit viewer. - Customize the capture viewer `UiConfig` based on the [default one](https://www.dynamsoft.com/document-viewer/docs/ui/default_ui.html#edit-viewer) to implement the workflow. - Add a "Back" buttom to header and bind click event to go back the perspective viewer @@ -479,7 +479,7 @@ To review and edit the captured images, we create an edit viewer. ```javascript perspectiveViewer.on("showEditViewer",() => { switchViewer(0,0,1) - }); + }); ``` - Register an event in `perspectiveViewer` to go back the capture viewer. @@ -487,7 +487,7 @@ To review and edit the captured images, we create an edit viewer. ```javascript perspectiveViewer.on("backToCaptureViewer",() => { switchViewer(1,0,0); - }); + }); ``` - Register an event in `editViewer` to go back the perspective viewer. @@ -495,7 +495,7 @@ To review and edit the captured images, we create an edit viewer. ```javascript editViewer.on("backToPerspectiveViewer",() => { switchViewer(0,1,0); - }); + }); ``` ## Review the complete code @@ -573,8 +573,8 @@ To review and edit the captured images, we create an edit viewer. // Bind click event to "ImagePreview" element // The event will be registered later type: Dynamsoft.DDV.Elements.ImagePreview, - events: { - click: "showPerspectiveViewer" + events: { + click: "showPerspectiveViewer" }, }, Dynamsoft.DDV.Elements.CameraConvert, @@ -607,7 +607,7 @@ To review and edit the captured images, we create an edit viewer. type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event to go back to capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -687,11 +687,11 @@ To review and edit the captured images, we create an edit viewer. Dynamsoft.DDV.Elements.Filter, Dynamsoft.DDV.Elements.Undo, Dynamsoft.DDV.Elements.Delete, - Dynamsoft.DDV.Elements.AnnotationSet, + Dynamsoft.DDV.Elements.AnnotationSet, ], }, ], - }; + }; // Create an edit viewer const editViewer = new Dynamsoft.DDV.EditViewer({ @@ -708,17 +708,17 @@ To review and edit the captured images, we create an edit viewer. // Register an event in `perspectiveViewer` to show the edit viewer perspectiveViewer.on("showEditViewer",() => { switchViewer(0,0,1) - }); + }); // Register an event in `perspectiveViewer` to go back the capture viewer perspectiveViewer.on("backToCaptureViewer",() => { switchViewer(1,0,0); - }); + }); // Register an event in `editViewer` to go back the perspective viewer editViewer.on("backToPerspectiveViewer",() => { switchViewer(0,1,0); - }); + }); // Control viewers' visibility. function switchViewer(capture, perspective, edit) { @@ -753,4 +753,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/codegallery/usecase/detect-boundaries-on-existing-image.md b/codegallery/usecase/detect-boundaries-on-existing-image.md index f128f33..ad5a70e 100644 --- a/codegallery/usecase/detect-boundaries-on-existing-image.md +++ b/codegallery/usecase/detect-boundaries-on-existing-image.md @@ -134,7 +134,7 @@ router.maxCvsSideLength = 99999; ## Create a perspective viewer -To review the detected boundaries on the loaded image(s), we will create a perspective viewer. +To review the detected boundaries on the loaded image(s), we will create a perspective viewer. - Customize the perspective viewer `UiConfig` - Bind click event to "PerspectiveAll" button. @@ -172,7 +172,7 @@ To review the detected boundaries on the loaded image(s), we will create a persp // Replace the default "RotateRight" button with an "AddNew" button in perspective viewer's footer and bind event to the new button // The event will be registered later type: Dynamsoft.DDV.Elements.Button, - className: "ddv-load-image2 addNewButton", + className: "ddv-load-image2 addNewButton", events: { click: "addNew" }, @@ -240,14 +240,14 @@ export function createFileInput(viewer, router){ const blob = new Blob([files[i]], { type: files[i].type, }); - const detectResult = await router.capture(blob, "detect-document-boundaries"); + const detectResult = await router.capture(blob, "detect-document-boundaries"); if(detectResult.items.length >0) { const quad = []; detectResult.items[0].location.points.forEach(p => { quad.push([p.x, p.y]); }); - + sourceArray.push({ fileData: blob, extraPageData:[{ @@ -387,7 +387,7 @@ document.getElementById("restore").onclick = () => { // Replace the default "RotateRight" button with an "AddNew" button in perspective viewer's footer and bind event to the new button // The event will be registered later type: Dynamsoft.DDV.Elements.Button, - className: "ddv-load-image2 addNewButton", + className: "ddv-load-image2 addNewButton", events: { click: "addNew" }, @@ -458,4 +458,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/codegallery/usecase/detect-boundaries-on-existing-images-v1.1.md b/codegallery/usecase/detect-boundaries-on-existing-images-v1.1.md index e66eb66..ee912ee 100644 --- a/codegallery/usecase/detect-boundaries-on-existing-images-v1.1.md +++ b/codegallery/usecase/detect-boundaries-on-existing-images-v1.1.md @@ -12,7 +12,7 @@ permalink: /codegallery/usecases/detect-boundaries-on-existing-images-v1.1.html # Detect boundaries on the existing images -This sample demonstrates how to detect the boundaries on the existing images which are from local directory/album. +This sample demonstrates how to detect the boundaries on the existing images which are from local directory/album. [Check out it online](https://dynamsoft.github.io/mobile-web-capture/samples/detect-boundaries-on-existing-images/) @@ -108,7 +108,7 @@ router.maxCvsSideLength = 99999; ## Create a perspective viewer -To review the detected boundaries on the loaded image(s), we will create a perspective viewer. +To review the detected boundaries on the loaded image(s), we will create a perspective viewer. - Customize the perspective viewer `UiConfig` - Bind click event to "PerspectiveAll" button. @@ -146,7 +146,7 @@ To review the detected boundaries on the loaded image(s), we will create a persp // Replace the default "RotateRight" button with an "AddNew" button in perspective viewer's footer and bind event to the new button // The event will be registered later type: Dynamsoft.DDV.Elements.Button, - className: "ddv-load-image2 addNewButton", + className: "ddv-load-image2 addNewButton", events: { click: "addNew" }, @@ -214,14 +214,14 @@ export function createFileInput(viewer, router){ const blob = new Blob([files[i]], { type: files[i].type, }); - const detectResult = await router.capture(blob, "detect-document-boundaries"); + const detectResult = await router.capture(blob, "detect-document-boundaries"); if(detectResult.items.length >0) { const quad = []; detectResult.items[0].location.points.forEach(p => { quad.push([p.x, p.y]); }); - + sourceArray.push({ fileData: blob, extraPageData:[{ @@ -348,7 +348,7 @@ Since the workflow in this sample is very simple, only the two events mentioned // Replace the default "RotateRight" button with an "AddNew" button in perspective viewer's footer and bind event to the new button // The event will be registered later type: Dynamsoft.DDV.Elements.Button, - className: "ddv-load-image2 addNewButton", + className: "ddv-load-image2 addNewButton", events: { click: "addNew" }, @@ -412,4 +412,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/codegallery/usecase/index-v1.1.md b/codegallery/usecase/index-v1.1.md index 917423a..c4202e0 100644 --- a/codegallery/usecase/index-v1.1.md +++ b/codegallery/usecase/index-v1.1.md @@ -6,13 +6,13 @@ noTitleIndex: true title: Mobile Web Capture - Use Cases keywords: Documentation, Mobile Web Capture, Use Cases breadcrumbText: Use Cases -description: Mobile Web Capture Documentation Use Cases +description: Mobile Web Capture Documentation Use Cases permalink: /codegallery/usecases/index-v1.1.html --- # Use Cases -Because the two SDKs, DDV and DDN, support comprehensive functions and flexible and efficient development, Mobile Web Capture can meet various workflows and needs. +Because the two SDKs, DDV and DDN, support comprehensive functions and flexible and efficient development, Mobile Web Capture can meet various workflows and needs. This part will introduce four popular use cases that the Mobile Web Capture solution can achieve. @@ -30,4 +30,4 @@ This part will introduce four popular use cases that the Mobile Web Capture solu - [Detect boundaries on the existing images]({{ site.codegallery }}usecases/detect-boundaries-on-existing-images-v1.1.html) - This sample demonstrates the use case that supports detecting the boundaries on the existing images from the local directory/album. + This sample demonstrates the use case that supports detecting the boundaries on the existing images from the local directory/album. diff --git a/codegallery/usecase/index.md b/codegallery/usecase/index.md index 6286094..a8b2045 100644 --- a/codegallery/usecase/index.md +++ b/codegallery/usecase/index.md @@ -6,13 +6,13 @@ noTitleIndex: true title: Mobile Web Capture - Use Cases keywords: Documentation, Mobile Web Capture, Use Cases breadcrumbText: Use Cases -description: Mobile Web Capture Documentation Use Cases +description: Mobile Web Capture Documentation Use Cases permalink: /codegallery/usecases/index.html --- # Use Cases -Because the two SDKs, DDV and DDN, support comprehensive functions and flexible and efficient development, Mobile Web Capture can meet various workflows and needs. +Because the two SDKs, DDV and DDN, support comprehensive functions and flexible and efficient development, Mobile Web Capture can meet various workflows and needs. This part will introduce four popular use cases that the Mobile Web Capture solution can achieve. diff --git a/codegallery/usecase/relatively-complete-doc-capturing-workflow-v1.1.md b/codegallery/usecase/relatively-complete-doc-capturing-workflow-v1.1.md index 7c86670..34c47e6 100644 --- a/codegallery/usecase/relatively-complete-doc-capturing-workflow-v1.1.md +++ b/codegallery/usecase/relatively-complete-doc-capturing-workflow-v1.1.md @@ -130,12 +130,12 @@ export async function initDocDetectModule(DDV, CVR) { success: false }); }; - + let width = image.width; let height = image.height; let ratio = 1; let data; - + if (height > 720) { ratio = height / 720; height = 720; @@ -144,8 +144,8 @@ export async function initDocDetectModule(DDV, CVR) { } else { data = image.data.slice(0); } - - + + // Define DSImage according to the usage of DDN const DSImage = { bytes: new Uint8Array(data), @@ -154,33 +154,33 @@ export async function initDocDetectModule(DDV, CVR) { stride: width * 4, //RGBA format: 10 // IPF_ABGR_8888 }; - + // Use DDN normalized module const results = await router.capture(DSImage, 'detect-document-boundaries'); - + // Filter the results and generate corresponding return values if (results.items.length <= 0) { return Promise.resolve({ success: false }); }; - + const quad = []; results.items[0].location.points.forEach((p) => { quad.push([p.x * ratio, p.y * ratio]); }); - + const detectResult = this.processDetectResult({ location: quad, width: image.width, height: image.height, config }); - + return Promise.resolve(detectResult); } } - + DDV.setProcessingHandler('documentBoundariesDetect', new DDNNormalizeHandler()) } @@ -197,42 +197,42 @@ function compress( } catch (error) { source = new Uint8Array(imageData); } - + const scaleW = newWidth / imageWidth; const scaleH = newHeight / imageHeight; const targetSize = newWidth * newHeight * 4; const targetMemory = new ArrayBuffer(targetSize); let distData = null; - + try { distData = new Uint8ClampedArray(targetMemory, 0, targetSize); } catch (error) { distData = new Uint8Array(targetMemory, 0, targetSize); } - + const filter = (distCol, distRow) => { const srcCol = Math.min(imageWidth - 1, distCol / scaleW); const srcRow = Math.min(imageHeight - 1, distRow / scaleH); const intCol = Math.floor(srcCol); const intRow = Math.floor(srcRow); - + let distI = (distRow * newWidth) + distCol; let srcI = (intRow * imageWidth) + intCol; - + distI *= 4; srcI *= 4; - + for (let j = 0; j <= 3; j += 1) { distData[distI + j] = source[srcI + j]; } }; - + for (let col = 0; col < newWidth; col += 1) { for (let row = 0; row < newHeight; row += 1) { filter(col, row); } } - + return distData; } ``` @@ -280,8 +280,8 @@ To capture images, we need to create a capture viewer. // Bind click event to "ImagePreview" element // The event will be registered later type: Dynamsoft.DDV.Elements.ImagePreview, - events: { - click: "showPerspectiveViewer" + events: { + click: "showPerspectiveViewer" }, }, Dynamsoft.DDV.Elements.CameraConvert, @@ -290,7 +290,7 @@ To capture images, we need to create a capture viewer. ], }; ``` - + - Create the viewer by using the new `UiConfig`. ```javascript @@ -324,7 +324,7 @@ To capture images, we need to create a capture viewer. type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event to go back to capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -383,7 +383,7 @@ To capture images, we need to create a capture viewer. ## Create an edit viewer -To review and edit the captured images, we create an edit viewer. +To review and edit the captured images, we create an edit viewer. - Customize the capture viewer `UiConfig` based on the [default one](https://www.dynamsoft.com/document-viewer/docs/ui/default_ui.html#edit-viewer) to implement the workflow. - Add a "Back" buttom to header and bind click event to go back the perspective viewer @@ -478,7 +478,7 @@ To review and edit the captured images, we create an edit viewer. ```javascript perspectiveViewer.on("showEditViewer",() => { switchViewer(0,0,1) - }); + }); ``` - Register an event in `perspectiveViewer` to go back the capture viewer. @@ -486,7 +486,7 @@ To review and edit the captured images, we create an edit viewer. ```javascript perspectiveViewer.on("backToCaptureViewer",() => { switchViewer(1,0,0); - }); + }); ``` - Register an event in `editViewer` to go back the perspective viewer. @@ -494,7 +494,7 @@ To review and edit the captured images, we create an edit viewer. ```javascript editViewer.on("backToPerspectiveViewer",() => { switchViewer(0,1,0); - }); + }); ``` ## Review the complete code @@ -572,8 +572,8 @@ To review and edit the captured images, we create an edit viewer. // Bind click event to "ImagePreview" element // The event will be registered later type: Dynamsoft.DDV.Elements.ImagePreview, - events: { - click: "showPerspectiveViewer" + events: { + click: "showPerspectiveViewer" }, }, Dynamsoft.DDV.Elements.CameraConvert, @@ -606,7 +606,7 @@ To review and edit the captured images, we create an edit viewer. type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event to go back to capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -689,7 +689,7 @@ To review and edit the captured images, we create an edit viewer. ], }, ], - }; + }; // Create an edit viewer const editViewer = new Dynamsoft.DDV.EditViewer({ @@ -706,17 +706,17 @@ To review and edit the captured images, we create an edit viewer. // Register an event in `perspectiveViewer` to show the edit viewer perspectiveViewer.on("showEditViewer",() => { switchViewer(0,0,1) - }); + }); // Register an event in `perspectiveViewer` to go back the capture viewer perspectiveViewer.on("backToCaptureViewer",() => { switchViewer(1,0,0); - }); + }); // Register an event in `editViewer` to go back the perspective viewer editViewer.on("backToPerspectiveViewer",() => { switchViewer(0,1,0); - }); + }); // Control viewers' visibility. function switchViewer(capture, perspective, edit) { @@ -751,4 +751,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/codegallery/usecase/review-adjust-detected-boundaries-v1.1.md b/codegallery/usecase/review-adjust-detected-boundaries-v1.1.md index 1d86569..ea788c2 100644 --- a/codegallery/usecase/review-adjust-detected-boundaries-v1.1.md +++ b/codegallery/usecase/review-adjust-detected-boundaries-v1.1.md @@ -35,7 +35,7 @@ Since this sample is based on HelloWorld, the basic steps are introduced in [Cre type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event to go back to the capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -242,7 +242,7 @@ document.getElementById("restore").onclick = () => { } }); // Play video stream in 1080P - captureViewer.play({ + captureViewer.play({ resolution: [1920,1080], fill: true }); @@ -260,7 +260,7 @@ document.getElementById("restore").onclick = () => { type: Dynamsoft.DDV.Elements.Layout, className: "ddv-perspective-viewer-header-mobile", children: [ - { + { // Add a "Back" button in perspective viewer's header and bind the event // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -317,7 +317,7 @@ document.getElementById("restore").onclick = () => { viewerConfig:{ scrollToLatest: true, } - }); + }); // Register the event for "Back" button perspectiveViewer.on("backToCaptureViewer",() => { @@ -332,7 +332,7 @@ document.getElementById("restore").onclick = () => { if(count === 0) { switchViewer(true,false) } - }); + }); // Register the event for "PerspectiveAll" button to display the result image perspectiveViewer.on("done", async () => { @@ -388,4 +388,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/faq.md b/faq.md index b4cf962..0440b04 100644 --- a/faq.md +++ b/faq.md @@ -5,4 +5,3 @@ description: This is the FAQ page of Mobile Web Capture. keywords: faq needAutoGenerateSidebar: true --- - diff --git a/gettingstarted/adddependency-v1.1.md b/gettingstarted/adddependency-v1.1.md index 3f267dc..8f47c40 100644 --- a/gettingstarted/adddependency-v1.1.md +++ b/gettingstarted/adddependency-v1.1.md @@ -109,7 +109,7 @@ 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 @@ -133,4 +133,4 @@ This is usually only required with frameworks like Angular or React, etc. where 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/"; - ``` \ No newline at end of file + ``` diff --git a/gettingstarted/adddependency.md b/gettingstarted/adddependency.md index 30aa3af..96f6904 100644 --- a/gettingstarted/adddependency.md +++ b/gettingstarted/adddependency.md @@ -143,4 +143,3 @@ This is usually only required with frameworks like Angular or React, etc. where 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 diff --git a/gettingstarted/helloworld-continuousmode.md b/gettingstarted/helloworld-continuousmode.md index 4d58674..3016fd1 100644 --- a/gettingstarted/helloworld-continuousmode.md +++ b/gettingstarted/helloworld-continuousmode.md @@ -161,12 +161,12 @@ export async function initDocDetectModule(DDV, CVR) { success: false }); }; - + let width = image.width; let height = image.height; let ratio = 1; let data; - + if (height > 720) { ratio = height / 720; height = 720; @@ -175,8 +175,8 @@ export async function initDocDetectModule(DDV, CVR) { } else { data = image.data.slice(0); } - - + + // Define DSImage according to the usage of DDN const DSImage = { bytes: new Uint8Array(data), @@ -185,33 +185,33 @@ export async function initDocDetectModule(DDV, CVR) { stride: width * 4, //RGBA format: 10 // IPF_ABGR_8888 }; - + // Use DDN normalized module const results = await router.capture(DSImage, 'detect-document-boundaries'); - + // Filter the results and generate corresponding return values if (results.items.length <= 0) { return Promise.resolve({ success: false }); }; - + const quad = []; results.items[0].location.points.forEach((p) => { quad.push([p.x * ratio, p.y * ratio]); }); - + const detectResult = this.processDetectResult({ location: quad, width: image.width, height: image.height, config }); - + return Promise.resolve(detectResult); } } - + DDV.setProcessingHandler('documentBoundariesDetect', new DDNNormalizeHandler()) } @@ -228,42 +228,42 @@ function compress( } catch (error) { source = new Uint8Array(imageData); } - + const scaleW = newWidth / imageWidth; const scaleH = newHeight / imageHeight; const targetSize = newWidth * newHeight * 4; const targetMemory = new ArrayBuffer(targetSize); let distData = null; - + try { distData = new Uint8ClampedArray(targetMemory, 0, targetSize); } catch (error) { distData = new Uint8Array(targetMemory, 0, targetSize); } - + const filter = (distCol, distRow) => { const srcCol = Math.min(imageWidth - 1, distCol / scaleW); const srcRow = Math.min(imageHeight - 1, distRow / scaleH); const intCol = Math.floor(srcCol); const intRow = Math.floor(srcRow); - + let distI = (distRow * newWidth) + distCol; let srcI = (intRow * imageWidth) + intCol; - + distI *= 4; srcI *= 4; - + for (let j = 0; j <= 3; j += 1) { distData[distI + j] = source[srcI + j]; } }; - + for (let col = 0; col < newWidth; col += 1) { for (let row = 0; row < newHeight; row += 1) { filter(col, row); } } - + return distData; } ``` @@ -307,11 +307,11 @@ To capture images, we need to create a capture viewer. type: Dynamsoft.DDV.Elements.Capture, className: "ddv-capture-viewer-captureButton", }, - { + { // Bind click event to "ImagePreview" element // The event will be registered later. type: Dynamsoft.DDV.Elements.ImagePreview, - events:{ + events:{ click: "showEditViewer", } }, @@ -321,7 +321,7 @@ To capture images, we need to create a capture viewer. ], }; ``` - + - Create the viewer by using the new `UiConfig`. ```javascript @@ -357,7 +357,7 @@ To review and edit the captured images, we create an edit viewer. type: Dynamsoft.DDV.Elements.Layout, className: "ddv-edit-viewer-header-mobile", children: [ - { + { // Add a "Back" button to header and bind click event to go back the capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -430,7 +430,7 @@ To review and edit the captured images, we create an edit viewer. children: [ Dynamsoft.DDV.Elements.Blank, Dynamsoft.DDV.Elements.Pagination, - { + { // Bind event for "PerspectiveAll" button to show the edit viewer // The event will be registered later. type: Dynamsoft.DDV.Elements.PerspectiveAll, @@ -589,11 +589,11 @@ Since the workflow in this sample is very simple, only the four events mentioned type: Dynamsoft.DDV.Elements.Capture, className: "ddv-capture-viewer-captureButton", }, - { + { // Bind click event to "ImagePreview" element // The event will be registered later. type: Dynamsoft.DDV.Elements.ImagePreview, - events:{ + events:{ click: "showEditViewer", } }, @@ -628,7 +628,7 @@ Since the workflow in this sample is very simple, only the four events mentioned type: Dynamsoft.DDV.Elements.Layout, className: "ddv-edit-viewer-header-mobile", children: [ - { + { // Add a "Back" button to header and bind click event to go back the capture viewer // The event will be registered later type: Dynamsoft.DDV.Elements.Button, @@ -687,7 +687,7 @@ Since the workflow in this sample is very simple, only the four events mentioned children: [ Dynamsoft.DDV.Elements.Blank, Dynamsoft.DDV.Elements.Pagination, - { + { // Bind event for "PerspectiveAll" button to show the edit viewer // The event will be registered later. type: Dynamsoft.DDV.Elements.PerspectiveAll, @@ -715,7 +715,7 @@ Since the workflow in this sample is very simple, only the four events mentioned // Create an perspective viewer const perspectiveViewer = new Dynamsoft.DDV.PerspectiveViewer({ container: "container", - groupUid: captureViewer.groupUid, // Data sync with the capture viewer + groupUid: captureViewer.groupUid, // Data sync with the capture viewer uiConfig: newPerspectiveUiConfig, }); @@ -766,4 +766,4 @@ Sometimes, you may want to add some auxiliary text to icons to show better user ### Refer to -- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) \ No newline at end of file +- [Customize Elements' Display Text](https://www.dynamsoft.com/document-viewer/docs/ui/customize/elements.html#display-text) diff --git a/gettingstarted/helloworld-singlepage.md b/gettingstarted/helloworld-singlepage.md index 01c870c..b432d82 100644 --- a/gettingstarted/helloworld-singlepage.md +++ b/gettingstarted/helloworld-singlepage.md @@ -608,4 +608,4 @@ We provide some samples which demonstrate the popular use cases, for example, re Please refer to the [Use Case]({{ site.codegallery }}usecases/index.html) section. -## [Demo](https://demo.dynamsoft.com/mobile-web-capture/) \ No newline at end of file +## [Demo](https://demo.dynamsoft.com/mobile-web-capture/) diff --git a/gettingstarted/helloworld-v1.1.md b/gettingstarted/helloworld-v1.1.md index b0c4c92..ba2a436 100644 --- a/gettingstarted/helloworld-v1.1.md +++ b/gettingstarted/helloworld-v1.1.md @@ -169,12 +169,12 @@ export async function initDocDetectModule(DDV, CVR) { success: false }); }; - + let width = image.width; let height = image.height; let ratio = 1; let data; - + if (height > 720) { ratio = height / 720; height = 720; @@ -183,8 +183,8 @@ export async function initDocDetectModule(DDV, CVR) { } else { data = image.data.slice(0); } - - + + // Define DSImage according to the usage of DDN const DSImage = { bytes: new Uint8Array(data), @@ -193,33 +193,33 @@ export async function initDocDetectModule(DDV, CVR) { stride: width * 4, //RGBA format: 10 // IPF_ABGR_8888 }; - + // Use DDN normalized module const results = await router.capture(DSImage, 'detect-document-boundaries'); - + // Filter the results and generate corresponding return values if (results.items.length <= 0) { return Promise.resolve({ success: false }); }; - + const quad = []; results.items[0].location.points.forEach((p) => { quad.push([p.x * ratio, p.y * ratio]); }); - + const detectResult = this.processDetectResult({ location: quad, width: image.width, height: image.height, config }); - + return Promise.resolve(detectResult); } } - + DDV.setProcessingHandler('documentBoundariesDetect', new DDNNormalizeHandler()) } @@ -236,42 +236,42 @@ function compress( } catch (error) { source = new Uint8Array(imageData); } - + const scaleW = newWidth / imageWidth; const scaleH = newHeight / imageHeight; const targetSize = newWidth * newHeight * 4; const targetMemory = new ArrayBuffer(targetSize); let distData = null; - + try { distData = new Uint8ClampedArray(targetMemory, 0, targetSize); } catch (error) { distData = new Uint8Array(targetMemory, 0, targetSize); } - + const filter = (distCol, distRow) => { const srcCol = Math.min(imageWidth - 1, distCol / scaleW); const srcRow = Math.min(imageHeight - 1, distRow / scaleH); const intCol = Math.floor(srcCol); const intRow = Math.floor(srcRow); - + let distI = (distRow * newWidth) + distCol; let srcI = (intRow * imageWidth) + intCol; - + distI *= 4; srcI *= 4; - + for (let j = 0; j <= 3; j += 1) { distData[distI + j] = source[srcI + j]; } }; - + for (let col = 0; col < newWidth; col += 1) { for (let row = 0; row < newHeight; row += 1) { filter(col, row); } } - + return distData; } ``` @@ -288,7 +288,7 @@ const captureViewer = new Dynamsoft.DDV.CaptureViewer({ } }); // Play video stream in 1080P -captureViewer.play({ +captureViewer.play({ resolution: [1920,1080], }); ``` @@ -301,9 +301,9 @@ Use the capture event to obtain the result image. captureViewer.on("captured", async (e) => { const pageData = await captureViewer.currentDocument.getPageData(e.pageUid); //Original image - document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); + document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); // Normalized image - document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); + document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); // Stop video stream and hide capture viewer's container captureViewer.stop(); document.getElementById("container").style.display = "none"; @@ -378,7 +378,7 @@ document.getElementById("restore").onclick = () => { } }); // Play video stream in 1080P - captureViewer.play({ + captureViewer.play({ resolution: [1920,1080], }); @@ -390,9 +390,9 @@ document.getElementById("restore").onclick = () => { const pageData = await captureViewer.currentDocument.getPageData(e.pageUid); // Original image - document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); + document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); // Normalized image - document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); + document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); }); // Restore Button function @@ -419,4 +419,4 @@ We provide some samples which demonstrate the popular use cases, for example, re Please refer to the [Use Case]({{ site.codegallery }}usecases/index.html) section. -## [Demo](https://demo.dynamsoft.com/mobile-web-capture/) \ No newline at end of file +## [Demo](https://demo.dynamsoft.com/mobile-web-capture/) diff --git a/gettingstarted/helloworld.md b/gettingstarted/helloworld.md index efbc198..0ce7e72 100644 --- a/gettingstarted/helloworld.md +++ b/gettingstarted/helloworld.md @@ -169,12 +169,12 @@ export async function initDocDetectModule(DDV, CVR) { success: false }); }; - + let width = image.width; let height = image.height; let ratio = 1; let data; - + if (height > 720) { ratio = height / 720; height = 720; @@ -183,8 +183,8 @@ export async function initDocDetectModule(DDV, CVR) { } else { data = image.data.slice(0); } - - + + // Define DSImage according to the usage of DDN const DSImage = { bytes: new Uint8Array(data), @@ -193,33 +193,33 @@ export async function initDocDetectModule(DDV, CVR) { stride: width * 4, //RGBA format: 10 // IPF_ABGR_8888 }; - + // Use DDN normalized module const results = await router.capture(DSImage, 'detect-document-boundaries'); - + // Filter the results and generate corresponding return values if (results.items.length <= 0) { return Promise.resolve({ success: false }); }; - + const quad = []; results.items[0].location.points.forEach((p) => { quad.push([p.x * ratio, p.y * ratio]); }); - + const detectResult = this.processDetectResult({ location: quad, width: image.width, height: image.height, config }); - + return Promise.resolve(detectResult); } } - + DDV.setProcessingHandler('documentBoundariesDetect', new DDNNormalizeHandler()) } @@ -236,42 +236,42 @@ function compress( } catch (error) { source = new Uint8Array(imageData); } - + const scaleW = newWidth / imageWidth; const scaleH = newHeight / imageHeight; const targetSize = newWidth * newHeight * 4; const targetMemory = new ArrayBuffer(targetSize); let distData = null; - + try { distData = new Uint8ClampedArray(targetMemory, 0, targetSize); } catch (error) { distData = new Uint8Array(targetMemory, 0, targetSize); } - + const filter = (distCol, distRow) => { const srcCol = Math.min(imageWidth - 1, distCol / scaleW); const srcRow = Math.min(imageHeight - 1, distRow / scaleH); const intCol = Math.floor(srcCol); const intRow = Math.floor(srcRow); - + let distI = (distRow * newWidth) + distCol; let srcI = (intRow * imageWidth) + intCol; - + distI *= 4; srcI *= 4; - + for (let j = 0; j <= 3; j += 1) { distData[distI + j] = source[srcI + j]; } }; - + for (let col = 0; col < newWidth; col += 1) { for (let row = 0; row < newHeight; row += 1) { filter(col, row); } } - + return distData; } ``` @@ -288,7 +288,7 @@ const captureViewer = new Dynamsoft.DDV.CaptureViewer({ } }); // Play video stream in 1080P -captureViewer.play({ +captureViewer.play({ resolution: [1920,1080], }); ``` @@ -301,9 +301,9 @@ Use the capture event to obtain the result image. captureViewer.on("captured", async (e) => { const pageData = await captureViewer.currentDocument.getPageData(e.pageUid); //Original image - document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); + document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); // Normalized image - document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); + document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); // Stop video stream and hide capture viewer's container captureViewer.stop(); document.getElementById("container").style.display = "none"; @@ -378,7 +378,7 @@ document.getElementById("restore").onclick = () => { } }); // Play video stream in 1080P - captureViewer.play({ + captureViewer.play({ resolution: [1920,1080], }); @@ -390,9 +390,9 @@ document.getElementById("restore").onclick = () => { const pageData = await captureViewer.currentDocument.getPageData(e.pageUid); // Original image - document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); + document.getElementById("original").src = URL.createObjectURL(pageData.raw.data); // Normalized image - document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); + document.getElementById("normalized").src = URL.createObjectURL(pageData.display.data); }); // Restore Button function @@ -419,4 +419,4 @@ We provide some samples which demonstrate the popular use cases, for example, re Please refer to the [Use Case]({{ site.codegallery }}usecases/index.html) section. -## [Demo](https://demo.dynamsoft.com/mobile-web-capture/) \ No newline at end of file +## [Demo](https://demo.dynamsoft.com/mobile-web-capture/) diff --git a/gettingstarted/license.md b/gettingstarted/license.md index 47f10e0..b897f87 100644 --- a/gettingstarted/license.md +++ b/gettingstarted/license.md @@ -30,4 +30,4 @@ await Dynamsoft.License.LicenseManager.initLicense( "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTEwMjQ5NjE5NyJ9", true ); // Public trial license which is valid for 24 hours -``` \ No newline at end of file +``` diff --git a/gettingstarted/systemrequirement.md b/gettingstarted/systemrequirement.md index ce0b9a0..f3bf378 100644 --- a/gettingstarted/systemrequirement.md +++ b/gettingstarted/systemrequirement.md @@ -17,10 +17,10 @@ As Mobile Web Capture solution is implemented by Dynamsoft Document Viewer and D - **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 test. - + - Dynamsoft License requires a secure context to work. - **`WebAssembly`, `Blob`, `URL`/`createObjectURL`, `Web Workers`** @@ -43,4 +43,4 @@ Apart from the browsers, the operating systems may impose some limitations of th ## Reference - [Dynamsoft Document Viewer - System Requirements](https://www.dynamsoft.com/document-viewer/docs/gettingstarted/sys_requirement.html) -- [Dynamsoft Document Normalizer - System Requirements](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/user-guide/index.html#system-requirements) \ No newline at end of file +- [Dynamsoft Document Normalizer - System Requirements](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/user-guide/index.html#system-requirements) diff --git a/guides/document-scanner-v3.0.md b/guides/document-scanner-v3.0.md index 8578249..ab72314 100644 --- a/guides/document-scanner-v3.0.md +++ b/guides/document-scanner-v3.0.md @@ -207,14 +207,14 @@ const result = await documentScanner.launch(); API Reference: [`launch()`](https://www.dynamsoft.com/mobile-web-capture/docs/api/document-scanner.html#launch) -This step launches the user into the document scanning workflow, beginning in the `DocumentScannerView`, where they can scan a document using one of three methods: +This step launches the user into the document scanning workflow, beginning in the `DocumentScannerView`, where they can scan a document using one of three methods: * Option 1: Manually scan by pressing the **shutter button**. * Option 2: Enable "**Smart Capture**" - the scanner will automatically capture an image once a document is detected. * Option 3: Enable "**Auto Crop**" - the scanner will automatically capture an image, detect the document, and crop it out of the video frame. > For Options 1 & 2: The user is directed to `DocumentCorrectionView` to review detected document boundaries and make any necessary adjustments before applying corrections. Afterward, they proceed to `DocumentResultView`. -> +> > For Option 3: The `DocumentCorrectionView` step is skipped. Image correction is applied automatically, and the user is taken directly to `DocumentResultView`. In `DocumentResultView`, if needed, the user can return to `DocumentCorrectionView` to make additional adjustments or press "Re-take" to restart the scanning process. @@ -375,20 +375,20 @@ We previously covered `container` in [Workflow Customization](#workflow-customiz > 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`. -By default, `cameraEnhancerUIPath` points to a file hosted on the jsDelivr CDN: -[https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.1.1/dist/document-scanner.ui.html](https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.1.1/dist/document-scanner.ui.html). +By default, `cameraEnhancerUIPath` points to a file hosted on the jsDelivr CDN: +[https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.1.1/dist/document-scanner.ui.html](https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.1.1/dist/document-scanner.ui.html). 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. ##### Steps to Customize the UI for `DocumentScannerView` -1. Follow the instructions in [Build from Source](#option-1-build-from-source) to obtain the source files for **DDS**. -2. Edit `/src/document-scanner.ui.html` to apply your customizations. -3. Build the project to generate the updated file in `/dist/document-scanner.ui.html`: +1. Follow the instructions in [Build from Source](#option-1-build-from-source) to obtain the source files for **DDS**. +2. Edit `/src/document-scanner.ui.html` to apply your customizations. +3. Build the project to generate the updated file in `/dist/document-scanner.ui.html`: ```bash npm run build ``` -4. Update the configuration to use the local file instead of the CDN version: +4. Update the configuration to use the local file instead of the CDN version: ```javascript const documentScanner = new Dynamsoft.DocumentScanner({ @@ -519,7 +519,7 @@ The `onDone` callback is triggered when the "Done" button is pressed. For exampl const documentScanner = new Dynamsoft.DocumentScanner({ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key resultViewConfig: { - onDone: async (result) => + onDone: async (result) => { const canvas = result.correctedImageResult.toCanvas(); resultContainer.appendChild(canvas); @@ -529,7 +529,7 @@ const documentScanner = new Dynamsoft.DocumentScanner({ ``` ##### Customizing the "Upload" Button -The `onUpload` callback is triggered when the "Upload" button is pressed. Note that the Upload button _only appears_ if a callback function is defined for `onUpload`; otherwise, the button remains hidden. +The `onUpload` callback is triggered when the "Upload" button is pressed. Note that the Upload button _only appears_ if a callback function is defined for `onUpload`; otherwise, the button remains hidden. The following example demonstrates how to upload the result image to a server: diff --git a/guides/document-scanner.md b/guides/document-scanner.md index c73cadd..0286ee8 100644 --- a/guides/document-scanner.md +++ b/guides/document-scanner.md @@ -226,7 +226,7 @@ API Reference: - [`launch()`]({{ site.api }}document-scanner.html#launch) -This step launches the user into the document scanning workflow, beginning in the `DocumentScannerView`, where they can scan a document using one of three methods: +This step launches the user into the document scanning workflow, beginning in the `DocumentScannerView`, where they can scan a document using one of three methods: * Option 1: Manually scan by pressing the **shutter button**. * Option 2: Enable "**Smart Capture**" - the scanner will automatically capture an image once a document is detected. @@ -234,7 +234,7 @@ This step launches the user into the document scanning workflow, beginning in th > [!TIP] > For Options 1 & 2: The user is directed to `DocumentCorrectionView` to review detected document boundaries and make any necessary adjustments before applying corrections. Afterward, they proceed to `DocumentResultView`. -> +> > For Option 3: The `DocumentCorrectionView` step is skipped. Image correction is applied automatically, and the user is taken directly to `DocumentResultView`. In `DocumentResultView`, if needed, the user can return to `DocumentCorrectionView` to make additional adjustments or press "Re-take" to restart the scanning process. @@ -432,7 +432,7 @@ if (files.length) { This bypasses the Scanner View entirely and brings up the Correction View as the first View, after having detected document boundaries on the static image. The user can proceed through the rest of the workflow and further alter the document boundaries, re-take another image (to open up the Scanner View), etc. > [!IMPORTANT] -> `launch()` can accept images or PDFs. If launching with a PDF, DDS will **only process the first page**. +> `launch()` can accept images or PDFs. If launching with a PDF, DDS will **only process the first page**. #### Example 5: Configure Scan Modes @@ -492,20 +492,20 @@ We previously covered `container` in [Workflow Customization](#workflow-customiz > [!TIP] > 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`. -By default, `cameraEnhancerUIPath` points to a file hosted on the jsDelivr CDN: -[https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.2/dist/document-scanner.ui.html](https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.2/dist/document-scanner.ui.html). +By default, `cameraEnhancerUIPath` points to a file hosted on the jsDelivr CDN: +[https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.2/dist/document-scanner.ui.html](https://cdn.jsdelivr.net/npm/dynamsoft-document-scanner@1.2/dist/document-scanner.ui.html). 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. ##### Steps to Customize the UI for `DocumentScannerView` -1. Follow the instructions in [Build from Source](#option-1-build-from-source) to obtain the source files for **DDS**. -2. Edit `/src/document-scanner.ui.html` to apply your customizations. -3. Build the project to generate the updated file in `/dist/document-scanner.ui.html`: +1. Follow the instructions in [Build from Source](#option-1-build-from-source) to obtain the source files for **DDS**. +2. Edit `/src/document-scanner.ui.html` to apply your customizations. +3. Build the project to generate the updated file in `/dist/document-scanner.ui.html`: ```bash npm run build ``` -4. Update the configuration to use the local file instead of the CDN version: +4. Update the configuration to use the local file instead of the CDN version: ```javascript const documentScanner = new Dynamsoft.DocumentScanner({ @@ -706,7 +706,7 @@ The `onDone` callback is triggered when the "Done" button is pressed. For exampl const documentScanner = new Dynamsoft.DocumentScanner({ license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key resultViewConfig: { - onDone: async (result) => + onDone: async (result) => { const canvas = result.correctedImageResult.toCanvas(); resultContainer.appendChild(canvas); @@ -723,7 +723,7 @@ API Reference: ##### Customizing the "Upload" Button -The `onUpload` callback is triggered when the "Upload" button is pressed. Note that the Upload button _only appears_ if a callback function is defined for `onUpload`; otherwise, the button remains hidden. +The `onUpload` callback is triggered when the "Upload" button is pressed. Note that the Upload button _only appears_ if a callback function is defined for `onUpload`; otherwise, the button remains hidden. The following example demonstrates how to upload the result image to a server: diff --git a/guides/mobile-web-capture-customization-v3.0.md b/guides/mobile-web-capture-customization-v3.0.md index c7b3577..f6c22ad 100644 --- a/guides/mobile-web-capture-customization-v3.0.md +++ b/guides/mobile-web-capture-customization-v3.0.md @@ -4,13 +4,13 @@ needAutoGenerateSidebar: true needGenerateH3Content: true noTitleIndex: false title: Mobile Web Capture - Scan Multi-Page Documents -keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, +keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, description: Mobile Web Capture User Guide --- # How to Customize Mobile Web Capture -> **Prerequisites:** +> **Prerequisites:** > Read the [MWC Getting Started Guide](https://www.dynamsoft.com/mobile-web-capture/docs/guides/mobile-web-capture.html) before proceeding. This guide expands on the **Hello World** sample from the **MWC Getting Started Guide** and explores the available customization options. @@ -35,7 +35,7 @@ Keep TOC only for npm /github as readme - [Modify the Build Script](#modify-the-build-script) - [Build the Project](#build-the-project) - [Serve the Project Locally](#serve-the-project-locally) -- [Next Step](#next-step) +- [Next Step](#next-step) --> ## MobileWebCaptureConfig Overview @@ -137,24 +137,24 @@ 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) + if (mobileWebCapture.hasLaunched) await mobileWebCapture.dispose(); await mobileWebCapture.launch(files[0]); } }; ``` -API Reference: +API Reference: - [`hasLaunched`](https://www.dynamsoft.com/mobile-web-capture/docs/api/mobile-web-capture.html#haslaunched) - [`dispose`](https://www.dynamsoft.com/mobile-web-capture/docs/api/mobile-web-capture.html#dispose) ### Scan Directly to Document -When **capturing** a document, it goes through three views: +When **capturing** a document, it goes through three views: -1. **`DocumentScannerView`** -2. **`DocumentCorrectionView`** (optional) -3. **`DocumentResultView`** (optional) +1. **`DocumentScannerView`** +2. **`DocumentCorrectionView`** (optional) +3. **`DocumentResultView`** (optional) The latter two views can be skipped to speed up the process. @@ -225,8 +225,8 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({ ``` > ⚠ **IMPORTANT**: The **Upload** feature is enabled simultaneously in `DocumentView` and `PageView` (and in `LibraryView` if it is enabled). If this is not intended, you can hide the **Upload** button in these **Views**. -> Read more: -> 1. [Disable Upload in DocumentView](#example-2-disable-upload-in-documentview) +> Read more: +> 1. [Disable Upload in DocumentView](#example-2-disable-upload-in-documentview) > 2. [Disable Upload in PageView](#example-1-disable-upload-in-pageview) > 3. [Disable Upload in LibraryView](#example-2-disable-upload-in-libraryview) @@ -487,7 +487,7 @@ By default, **MWC** relies on a **CDN** for resources such as `.wasm` engine fil #### Update the Resource Paths -The following code modifies how resource files are referenced: +The following code modifies how resource files are referenced: > 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/). @@ -560,5 +560,3 @@ Now, all required files will be **served locally** without relying on a CDN. ## Next Step Start building your own mobile document capture and management solution with **MWC**! If you encounter any technical issues or have suggestions, feel free to [contact us](https://www.dynamsoft.com/company/contact/). - - diff --git a/guides/mobile-web-capture-customization.md b/guides/mobile-web-capture-customization.md index 840887d..7426124 100644 --- a/guides/mobile-web-capture-customization.md +++ b/guides/mobile-web-capture-customization.md @@ -4,13 +4,13 @@ needAutoGenerateSidebar: true needGenerateH3Content: true noTitleIndex: false title: Mobile Web Capture - Scan Multi-Page Documents -keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, +keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, description: Mobile Web Capture User Guide --- # How to Customize Mobile Web Capture -> [!TIP] +> [!TIP] > Prerequisites: read the [MWC Getting Started Guide]({{ site.guides }}mobile-web-capture.html) before proceeding. This guide expands on the **Hello World** sample from the **MWC Getting Started Guide** and explores the available customization options. @@ -35,7 +35,7 @@ Keep TOC only for npm /github as readme - [Modify the Build Script](#modify-the-build-script) - [Build the Project](#build-the-project) - [Serve the Project Locally](#serve-the-project-locally) -- [Next Step](#next-step) +- [Next Step](#next-step) --> ## MobileWebCaptureConfig Overview @@ -138,24 +138,24 @@ 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) + if (mobileWebCapture.hasLaunched) await mobileWebCapture.dispose(); await mobileWebCapture.launch(files[0]); } }; ``` -API Reference: +API Reference: - [`hasLaunched`]({{ site.api }}mobile-web-capture.html#haslaunched) - [`dispose`]({{ site.api }}mobile-web-capture.html#dispose) ### Scan Directly to Document -When **capturing** a document, it goes through three views: +When **capturing** a document, it goes through three views: -1. **`DocumentScannerView`** -2. **`DocumentCorrectionView`** (optional) -3. **`DocumentResultView`** (optional) +1. **`DocumentScannerView`** +2. **`DocumentCorrectionView`** (optional) +3. **`DocumentResultView`** (optional) The latter two views can be skipped to speed up the process. @@ -231,8 +231,8 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({ > [!IMPORTANT] > The **Upload** feature is enabled simultaneously in `DocumentView` and `PageView` (and in `LibraryView` if it is enabled). If this is not intended, you can hide the **Upload** button in these **Views**. -> Read more: -> 1. [Disable Upload in DocumentView](#example-2-disable-upload-in-documentview) +> Read more: +> 1. [Disable Upload in DocumentView](#example-2-disable-upload-in-documentview) > 2. [Disable Upload in PageView](#example-1-disable-upload-in-pageview) > 3. [Disable Upload in LibraryView](#example-2-disable-upload-in-libraryview) @@ -499,7 +499,7 @@ By default, **MWC** relies on a **CDN** for resources such as `.wasm` engine fil #### Update the Resource Paths -The following code modifies how resource files are referenced: +The following code modifies how resource files are referenced: > [!TIP] > 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/). @@ -572,5 +572,3 @@ Now, all required files will be **served locally** without relying on a CDN. ## Next Step Start building your own mobile document capture and management solution with **MWC**! If you encounter any technical issues or have suggestions, feel free to [contact us](https://www.dynamsoft.com/company/contact/). - - diff --git a/guides/mobile-web-capture-v3.0.md b/guides/mobile-web-capture-v3.0.md index 6e4ef00..7369fa7 100644 --- a/guides/mobile-web-capture-v3.0.md +++ b/guides/mobile-web-capture-v3.0.md @@ -4,14 +4,14 @@ needAutoGenerateSidebar: true needGenerateH3Content: true noTitleIndex: false title: Mobile Web Capture - Scan Multi-Page Documents -keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, +keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, description: Mobile Web Capture User Guide --- # Scan Multi-Page Documents with Mobile Web Capture > Prerequisites: -> +> > Read the [Introduction](https://www.dynamsoft.com/mobile-web-capture/docs/introduction/index.html) before proceeding. **Mobile Web Capture (MWC)** is an SDK designed for scanning multi-page documents. It integrates **Dynamsoft Document Scanner (DDS)** functionality while offering additional features such as multi-document management, annotation, and uploading, making it a comprehensive solution for managing complex document workflows. diff --git a/guides/mobile-web-capture.md b/guides/mobile-web-capture.md index 323cf41..f85f526 100644 --- a/guides/mobile-web-capture.md +++ b/guides/mobile-web-capture.md @@ -4,7 +4,7 @@ needAutoGenerateSidebar: true needGenerateH3Content: true noTitleIndex: false title: Mobile Web Capture - Scan Multi-Page Documents -keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, +keywords: Documentation, Mobile Web Capture, Dynamsoft Document Scanner, description: Mobile Web Capture User Guide --- diff --git a/index-v1.1.md b/index-v1.1.md index 23f44bc..a529c4f 100644 --- a/index-v1.1.md +++ b/index-v1.1.md @@ -21,4 +21,4 @@ description: Mobile Web Capture Documentation Homepage - [Detect boundaries on the existing images]({{ site.codegallery }}usecases/detect-boundaries-on-existing-images-v1.1.html) - [Related API reference]({{ site.api }}relatedapi.html) -- [Release notes]({{ site.releasenotes }}index.html) \ No newline at end of file +- [Release notes]({{ site.releasenotes }}index.html) diff --git a/index.md b/index.md index 2fe96f1..978964f 100644 --- a/index.md +++ b/index.md @@ -15,4 +15,4 @@ description: Mobile Web Capture Documentation Homepage - [API References]({{ site.api }}index.html) - [Document Scanner]({{ site.api }}document-scanner.html) - [Mobile Web Capture]({{ site.api }}mobile-web-capture.html) -- [Release notes]({{ site.releasenotes }}index.html) \ No newline at end of file +- [Release notes]({{ site.releasenotes }}index.html) diff --git a/introduction/index-v3.0.md b/introduction/index-v3.0.md index 328c8a1..c92a2ed 100644 --- a/introduction/index-v3.0.md +++ b/introduction/index-v3.0.md @@ -51,7 +51,7 @@ In short, for scenarios requiring **document management beyond single-page captu | Export multi-page documents as PDFs with options for selected pages, one or multiple full documents | | ✓ | > To deliver these features, we built **DDS** using two core Dynamsoft products: [**Dynamsoft Camera Enhancer**](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html?lang=javascript) (DCE) and [**Dynamsoft Document Normalizer**](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/user-guide/index.html?lang=javascript) (DDN). -> +> > **MWC** extends this foundation by adding document management, processing, and editing features through [**Dynamsoft Document Viewer**](https://www.dynamsoft.com/document-viewer/docs/introduction/index.html) (DDV). Both products operate within the [**Dynamsoft Capture Vision**](https://www.dynamsoft.com/capture-vision/docs/core/architecture/?lang=javascript) (DCV) architecture. ## Design Principles diff --git a/introduction/index.md b/introduction/index.md index e44e373..cb7dd67 100644 --- a/introduction/index.md +++ b/introduction/index.md @@ -53,7 +53,7 @@ In short, for scenarios requiring **document management beyond single-page captu > [!NOTE] > To deliver these features, we built **DDS** using two core Dynamsoft products: [**Dynamsoft Camera Enhancer**](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html?lang=javascript) (DCE) and [**Dynamsoft Document Normalizer**](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/user-guide/index.html?lang=javascript) (DDN). -> +> > **MWC** extends this foundation by adding document management, processing, and editing features through [**Dynamsoft Document Viewer**](https://www.dynamsoft.com/document-viewer/docs/introduction/index.html) (DDV). Both products operate within the [**Dynamsoft Capture Vision**](https://www.dynamsoft.com/capture-vision/docs/core/architecture/?lang=javascript) (DCV) architecture. ## Design Principles diff --git a/release-notes/mobile-web-capture.md b/release-notes/mobile-web-capture.md index 9eee50d..cf8f214 100644 --- a/release-notes/mobile-web-capture.md +++ b/release-notes/mobile-web-capture.md @@ -15,7 +15,7 @@ permalink: /release-notes/mobile-web-capture.html ## 3.1.0 (05/01/2025) The most notable improvement in this version is the pluggable scanner feature. This allows MWC to integrate any custom scanner. - + ### Features 1. Add Pluggable Scanner feature which integrates any scanner satisfying the following: @@ -51,7 +51,7 @@ In this release, **Mobile Web Capture (MWC)** has been completely redesigned fro - Full suite of PDF annotation and editing tools - Upload documents to a server or save them locally - Ready-to-use and flexible document scanning workflow -- Modular, view-based design for easy maintenance and customization +- Modular, view-based design for easy maintenance and customization ### Views @@ -116,4 +116,4 @@ Includes Includes - [Dynamsoft Document Viewer Javascript Edition 1.0.0](https://www.dynamsoft.com/document-viewer/docs/releasenotes/index.html#100-12262023) -- [Dynamsoft Document Normalizer Javascript Edition 2.0.11](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/release-notes/javascript-2.html#2011-08242023) \ No newline at end of file +- [Dynamsoft Document Normalizer Javascript Edition 2.0.11](https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/release-notes/javascript-2.html#2011-08242023) diff --git a/search.md b/search.md index 1b13527..1b02129 100644 --- a/search.md +++ b/search.md @@ -3,4 +3,4 @@ layout: search-page title: Mobile Web Capture Documentation Search keywords: Mobile Web Capture Documentation Search cx: 912cbb35fff874a8d ---- \ No newline at end of file +--- diff --git a/web.config b/web.config index 554cc5f..27b0548 100644 --- a/web.config +++ b/web.config @@ -1,46 +1,46 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From bdbf17a72ccaf02ac88b44767e1c5e6ff60022cf Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:03:00 -0700 Subject: [PATCH 07/28] chore: fix .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7597199..4f9e1ef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ _layouts/ # Assets assets/font-face/ assets/img-icon/ -assets/js/ +assets/js/** !assets/js/setLatestVersion.js assets/scripts/ assets/css/ From 595a1090584fa82f86826b757353427d41026ebe Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:03:46 -0700 Subject: [PATCH 08/28] chore: remove extra .editorconfig --- .editorconfig | 59 --------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 1639887..0000000 --- a/.editorconfig +++ /dev/null @@ -1,59 +0,0 @@ -[*] -cpp_indent_braces=false -cpp_indent_multi_line_relative_to=innermost_parenthesis -cpp_indent_within_parentheses=indent -cpp_indent_preserve_within_parentheses=false -cpp_indent_case_labels=false -cpp_indent_case_contents=true -cpp_indent_case_contents_when_block=false -cpp_indent_lambda_braces_when_parameter=true -cpp_indent_goto_labels=one_left -cpp_indent_preprocessor=leftmost_column -cpp_indent_access_specifiers=false -cpp_indent_namespace_contents=true -cpp_indent_preserve_comments=false -cpp_new_line_before_open_brace_namespace=ignore -cpp_new_line_before_open_brace_type=ignore -cpp_new_line_before_open_brace_function=ignore -cpp_new_line_before_open_brace_block=ignore -cpp_new_line_before_open_brace_lambda=ignore -cpp_new_line_scope_braces_on_separate_lines=false -cpp_new_line_close_brace_same_line_empty_type=false -cpp_new_line_close_brace_same_line_empty_function=false -cpp_new_line_before_catch=true -cpp_new_line_before_else=true -cpp_new_line_before_while_in_do_while=false -cpp_space_before_function_open_parenthesis=remove -cpp_space_within_parameter_list_parentheses=false -cpp_space_between_empty_parameter_list_parentheses=false -cpp_space_after_keywords_in_control_flow_statements=true -cpp_space_within_control_flow_statement_parentheses=false -cpp_space_before_lambda_open_parenthesis=false -cpp_space_within_cast_parentheses=false -cpp_space_after_cast_close_parenthesis=false -cpp_space_within_expression_parentheses=false -cpp_space_before_block_open_brace=true -cpp_space_between_empty_braces=false -cpp_space_before_initializer_list_open_brace=false -cpp_space_within_initializer_list_braces=true -cpp_space_preserve_in_initializer_list=true -cpp_space_before_open_square_bracket=false -cpp_space_within_square_brackets=false -cpp_space_before_empty_square_brackets=false -cpp_space_between_empty_square_brackets=false -cpp_space_group_square_brackets=true -cpp_space_within_lambda_brackets=false -cpp_space_between_empty_lambda_brackets=false -cpp_space_before_comma=false -cpp_space_after_comma=true -cpp_space_remove_around_member_operators=true -cpp_space_before_inheritance_colon=true -cpp_space_before_constructor_colon=true -cpp_space_remove_before_semicolon=true -cpp_space_after_semicolon=false -cpp_space_remove_around_unary_operator=true -cpp_space_around_binary_operator=insert -cpp_space_around_assignment_operator=insert -cpp_space_pointer_reference_alignment=left -cpp_space_around_ternary_operator=insert -cpp_wrap_preserve_blocks=one_liners From 630cf06c4323797bc13288eaf21cbed56220b048 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:25:31 -0700 Subject: [PATCH 09/28] fix: release notes linking --- _config.yml | 2 +- _includes/sidelist-releasenotes.html | 2 +- index-v1.1.md | 2 +- index.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 2dded18..fe0b774 100644 --- a/_config.yml +++ b/_config.yml @@ -11,7 +11,7 @@ api: /mobile-web-capture/docs/api/ guides: /mobile-web-capture/docs/guides/ -releasenotes: /mobile-web-capture/docs/releasenotes/ +release-notes: /mobile-web-capture/docs/release-notes/ useVersionTree: true diff --git a/_includes/sidelist-releasenotes.html b/_includes/sidelist-releasenotes.html index 0543afb..5824f96 100644 --- a/_includes/sidelist-releasenotes.html +++ b/_includes/sidelist-releasenotes.html @@ -1 +1 @@ -
  • Release Notes
  • +
  • Release Notes
  • diff --git a/index-v1.1.md b/index-v1.1.md index a529c4f..6bf6339 100644 --- a/index-v1.1.md +++ b/index-v1.1.md @@ -21,4 +21,4 @@ description: Mobile Web Capture Documentation Homepage - [Detect boundaries on the existing images]({{ site.codegallery }}usecases/detect-boundaries-on-existing-images-v1.1.html) - [Related API reference]({{ site.api }}relatedapi.html) -- [Release notes]({{ site.releasenotes }}index.html) +- [Release notes]({{ site.release-notes }}index.html) diff --git a/index.md b/index.md index 978964f..b471a2b 100644 --- a/index.md +++ b/index.md @@ -15,4 +15,4 @@ description: Mobile Web Capture Documentation Homepage - [API References]({{ site.api }}index.html) - [Document Scanner]({{ site.api }}document-scanner.html) - [Mobile Web Capture]({{ site.api }}mobile-web-capture.html) -- [Release notes]({{ site.releasenotes }}index.html) +- [Release notes]({{ site.release-notes }}mobile-web-capture.html) From 035be4fa559cd75b0a854c206bdf74a0a70a80ca Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:27:18 -0700 Subject: [PATCH 10/28] fix: rename release notes sidelist --- _data/full_tree.yml | 2 +- _includes/sidelist-full-tree-v2.0.html | 2 +- _includes/sidelist-full-tree.html | 2 +- _includes/sidelist-releasenotes.html | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 _includes/sidelist-releasenotes.html diff --git a/_data/full_tree.yml b/_data/full_tree.yml index 193fca0..0612ff8 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -2,7 +2,7 @@ tree_file_list: - sidelist-introduction.html - sidelist-guides.html - sidelist-api.html - - sidelist-releasenotes.html + - sidelist-release-notes.html - sidelist-full-tree.html - sidelist-apis-v2.0.html - sidelist-full-tree.v2.0.html diff --git a/_includes/sidelist-full-tree-v2.0.html b/_includes/sidelist-full-tree-v2.0.html index 334e3e9..0fd0efc 100644 --- a/_includes/sidelist-full-tree-v2.0.html +++ b/_includes/sidelist-full-tree-v2.0.html @@ -2,4 +2,4 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-gettingstarted.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-codegallery.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-apis.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.html" -%} diff --git a/_includes/sidelist-full-tree.html b/_includes/sidelist-full-tree.html index 3dac988..241f2ba 100644 --- a/_includes/sidelist-full-tree.html +++ b/_includes/sidelist-full-tree.html @@ -4,4 +4,4 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-api.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.html" -%} diff --git a/_includes/sidelist-releasenotes.html b/_includes/sidelist-releasenotes.html deleted file mode 100644 index 5824f96..0000000 --- a/_includes/sidelist-releasenotes.html +++ /dev/null @@ -1 +0,0 @@ -
  • Release Notes
  • From dc0f4ac90143e80361c05652b209707c43761f8b Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:28:23 -0700 Subject: [PATCH 11/28] fix: rename release notes sidelist --- _includes/sidelist-release-notes.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 _includes/sidelist-release-notes.html diff --git a/_includes/sidelist-release-notes.html b/_includes/sidelist-release-notes.html new file mode 100644 index 0000000..5824f96 --- /dev/null +++ b/_includes/sidelist-release-notes.html @@ -0,0 +1 @@ +
  • Release Notes
  • From 1980de30a06fcfc7f3352d5433bfb7d1727b8792 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 16:12:53 -0700 Subject: [PATCH 12/28] chore: use main branch Docs-Template-Repo for preview CI --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9137b0c..aa5f6a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: Build-Preview: if: ${{ github.ref == 'refs/heads/preview' }} - uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@preview + uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@main with: doc-repo: mobile-web-capture-docs doc-url: mobile-web-capture/docs/ From 393b2180e02371b9a00ea9572d089f3105525677 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Thu, 12 Jun 2025 10:59:45 -0700 Subject: [PATCH 13/28] fix: allow preview CI on push to preview branch --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa5f6a1..8652116 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,11 +4,11 @@ name: CI # Controls when the workflow will run on: - # Triggers the workflow on push events but only for the master branch + # Triggers the workflow on push events to the main and preview branches push: branches: - main - # - preview + - preview # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 40aada7e17e85f6befdb992b7c7fcaaed230b72b Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:11:06 -0700 Subject: [PATCH 14/28] add: code gallery and web framework samples --- _config.yml | 1 + _data/full_tree.yml | 1 + _includes/sidelist-code-gallery.html | 9 ++++++++ _includes/sidelist-full-tree.html | 1 + code-gallery/frameworks.md | 33 ++++++++++++++++++++++++++++ introduction/index.md | 2 +- 6 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 _includes/sidelist-code-gallery.html create mode 100644 code-gallery/frameworks.md diff --git a/_config.yml b/_config.yml index fe0b774..279c87d 100644 --- a/_config.yml +++ b/_config.yml @@ -7,6 +7,7 @@ docHomePage: /mobile-web-capture/docs/introduction/ introduction: /mobile-web-capture/docs/introduction/ gettingstarted: /mobile-web-capture/docs/gettingstarted/ codegallery: /mobile-web-capture/docs/codegallery/ +code-gallery: /mobile-web-capture/docs/code-gallery/ api: /mobile-web-capture/docs/api/ guides: /mobile-web-capture/docs/guides/ diff --git a/_data/full_tree.yml b/_data/full_tree.yml index 0612ff8..68b8773 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -1,6 +1,7 @@ tree_file_list: - sidelist-introduction.html - sidelist-guides.html + - sidelist-code-gallery.html - sidelist-api.html - sidelist-release-notes.html - sidelist-full-tree.html diff --git a/_includes/sidelist-code-gallery.html b/_includes/sidelist-code-gallery.html new file mode 100644 index 0000000..a5b4b95 --- /dev/null +++ b/_includes/sidelist-code-gallery.html @@ -0,0 +1,9 @@ +
  • Code Gallery + +
  • diff --git a/_includes/sidelist-full-tree.html b/_includes/sidelist-full-tree.html index 241f2ba..3c0f902 100644 --- a/_includes/sidelist-full-tree.html +++ b/_includes/sidelist-full-tree.html @@ -2,6 +2,7 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-guides.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-code-gallery.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-api.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.html" -%} diff --git a/code-gallery/frameworks.md b/code-gallery/frameworks.md new file mode 100644 index 0000000..eec4d14 --- /dev/null +++ b/code-gallery/frameworks.md @@ -0,0 +1,33 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: false +title: Mobile Web Capture - Frameworks +keywords: Documentation, Mobile Web Capture, frameworks, web frameworks, angular, vue, react +breadcrumbText: Frameworks +description: Mobile Web Capture Framework Samples +--- + +# Frameworks + +Dynamsoft provides samples that show how to integrate Dynamsoft Document Scanner and Mobile Web Capture in various frameworks. We recommend using our samples as references when building web applications with DDS and MWC with frameworks. + +> [!NOTE] +> Please [contact us](https://www.dynamsoft.com/company/contact/) for any inquiries about currently unsupported frameworks. + +## Web Framework Samples + +We host samples with Hello World implementations of DDS and MWC on GitHub, in the same repository as the source code for the SDKs. Follow the README contained in the directory of each sample for instructions to build and serve the sample: + +### Dynamsoft Document Scanner + +- [Angular](https://github.com/Dynamsoft/document-scanner-javascript/tree/master/samples/frameworks/angular) +- [React](https://github.com/Dynamsoft/document-scanner-javascript/tree/master/samples/frameworks/react) +- [Vue](https://github.com/Dynamsoft/document-scanner-javascript/tree/master/samples/frameworks/vue) + +### Mobile Web Capture + +- [Angular](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/angular) +- [React](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/react) +- [Vue](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/vue) diff --git a/introduction/index.md b/introduction/index.md index cb7dd67..3ae7693 100644 --- a/introduction/index.md +++ b/introduction/index.md @@ -12,7 +12,7 @@ permalink: /introduction/index.html # Introduction -When digitizing physical documents—whether for easier storage, better accessibility, or streamlined processing — a hardware scanner is often the preferred choice. For integrating this functionality into web applications, **Dynamsoft’s** [Dynamic Web TWAIN](https://www.dynamsoft.com/web-twain/docs/introduction/index.html) is a widely popular option. +When digitizing physical documents — whether for easier storage, better accessibility, or streamlined processing — a hardware scanner is often the preferred choice. For integrating this functionality into web applications, **Dynamsoft’s** [Dynamic Web TWAIN](https://www.dynamsoft.com/web-twain/docs/introduction/index.html) is a widely popular option. However, when hardware scanners are not feasible or convenient, mobile device cameras can serve as effective alternatives. **Mobile Web Capture (MWC)** is a document scanning SDK specifically designed to address this need. From fb97a180298d18b63cf345d80c4e98acf839f294 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:30:14 -0700 Subject: [PATCH 15/28] fix: MWC v2.0 sidelist --- _includes/sidelist-full-tree-v2.0.html | 10 +++++----- _includes/sidelist-full-tree.html | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/_includes/sidelist-full-tree-v2.0.html b/_includes/sidelist-full-tree-v2.0.html index 0fd0efc..eea1dd9 100644 --- a/_includes/sidelist-full-tree-v2.0.html +++ b/_includes/sidelist-full-tree-v2.0.html @@ -1,5 +1,5 @@ -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-introduction.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-gettingstarted.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-codegallery.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-apis.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-introduction-v2.0.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-gettingstarted-v2.0.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-codegallery-v2.0.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-apis-v2.0.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes-v2.0.html" -%} diff --git a/_includes/sidelist-full-tree.html b/_includes/sidelist-full-tree.html index 3c0f902..e75dce5 100644 --- a/_includes/sidelist-full-tree.html +++ b/_includes/sidelist-full-tree.html @@ -1,8 +1,5 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-introduction.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-guides.html" -%} - - {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-code-gallery.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-api.html" -%} - {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.html" -%} From 99a601a0d26a65f04d606e8499dc3eae7f6415ad Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:01:09 -0700 Subject: [PATCH 16/28] fix: code gallery links --- _includes/sidelist-code-gallery.html | 6 +----- index.md | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_includes/sidelist-code-gallery.html b/_includes/sidelist-code-gallery.html index a5b4b95..afa9ce1 100644 --- a/_includes/sidelist-code-gallery.html +++ b/_includes/sidelist-code-gallery.html @@ -1,9 +1,5 @@
  • Code Gallery
  • diff --git a/index.md b/index.md index b471a2b..2df89c3 100644 --- a/index.md +++ b/index.md @@ -12,6 +12,8 @@ description: Mobile Web Capture Documentation Homepage - [Scan Single-Page Documents]({{ site.guides }}document-scanner.html) - [Scan Multi-Page Documents]({{ site.guides }}mobile-web-capture.html) - [Customize UI And Workflow]({{ site.guides }}mobile-web-capture-customization.html) +- Code Gallery + - [Frameworks]({{ site.code-gallery }}frameworks.html) - [API References]({{ site.api }}index.html) - [Document Scanner]({{ site.api }}document-scanner.html) - [Mobile Web Capture]({{ site.api }}mobile-web-capture.html) From b7eaeabf8628261a68f5f559b7ed09bf1a458439 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:02:04 -0700 Subject: [PATCH 17/28] fix: web framework links --- code-gallery/frameworks.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/code-gallery/frameworks.md b/code-gallery/frameworks.md index eec4d14..59da7b1 100644 --- a/code-gallery/frameworks.md +++ b/code-gallery/frameworks.md @@ -1,12 +1,13 @@ --- layout: default-layout -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: false +# needAutoGenerateSidebar: true +# needGenerateH3Content: true +# noTitleIndex: false title: Mobile Web Capture - Frameworks keywords: Documentation, Mobile Web Capture, frameworks, web frameworks, angular, vue, react breadcrumbText: Frameworks description: Mobile Web Capture Framework Samples +permalink: /code-gallery/frameworks.html --- # Frameworks @@ -20,14 +21,6 @@ Dynamsoft provides samples that show how to integrate Dynamsoft Document Scanner We host samples with Hello World implementations of DDS and MWC on GitHub, in the same repository as the source code for the SDKs. Follow the README contained in the directory of each sample for instructions to build and serve the sample: -### Dynamsoft Document Scanner - -- [Angular](https://github.com/Dynamsoft/document-scanner-javascript/tree/master/samples/frameworks/angular) -- [React](https://github.com/Dynamsoft/document-scanner-javascript/tree/master/samples/frameworks/react) -- [Vue](https://github.com/Dynamsoft/document-scanner-javascript/tree/master/samples/frameworks/vue) - ### Mobile Web Capture - [Angular](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/angular) -- [React](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/react) -- [Vue](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/vue) From f7591ab33e54257a0d38d83a2043e0baed87f204 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:28:53 -0700 Subject: [PATCH 18/28] sample: add MWC react and vue samples --- code-gallery/frameworks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code-gallery/frameworks.md b/code-gallery/frameworks.md index 59da7b1..a5d188d 100644 --- a/code-gallery/frameworks.md +++ b/code-gallery/frameworks.md @@ -24,3 +24,5 @@ We host samples with Hello World implementations of DDS and MWC on GitHub, in th ### Mobile Web Capture - [Angular](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/angular) +- [React](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/react-hooks) +- [Vue](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/vue) From 34826b546cbaae7f684d0dfe0f60838baaa17a70 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 18 Jun 2025 15:30:44 -0700 Subject: [PATCH 19/28] fix: EOF newline --- code-gallery/frameworks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-gallery/frameworks.md b/code-gallery/frameworks.md index af00f05..a5d188d 100644 --- a/code-gallery/frameworks.md +++ b/code-gallery/frameworks.md @@ -25,4 +25,4 @@ We host samples with Hello World implementations of DDS and MWC on GitHub, in th - [Angular](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/angular) - [React](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/react-hooks) -- [Vue](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/vue) \ No newline at end of file +- [Vue](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/vue) From 5dddcc7f3809cca1a7119d283f8e05782e4359d0 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:15:04 -0700 Subject: [PATCH 20/28] feat: self hosted DDS resources option --- guides/document-scanner.md | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/guides/document-scanner.md b/guides/document-scanner.md index 0286ee8..4b3cfda 100644 --- a/guides/document-scanner.md +++ b/guides/document-scanner.md @@ -159,6 +159,58 @@ If you are using VS Code, a quick and easy way to serve the project is using the Alternatively, you can use other methods like `IIS` or `Apache` to serve the project, though we won't cover those here for brevity. +### Self-Host Resources + +Self hosting library resources gives you full control over hosting your application. Rather than using the CDN to serve resources, you have the option to download the resource files and host them on your own servers to deliver to your users when they use your application. + +#### Download Resources + +First, download a copy of the resources. There are two options: + +1. GitHub: go to the official [Github repository](https://github.com/Dynamsoft/mrz-scanner-javascript), and download the repository as an archive. + +2. NPM: Install the DDS package through NPM using the command `npm i dynamsoft-document-scanner@1.2.0 -E`. + +Locate the `node_modules` directory. You need the resources located in all the modules with the `dynamsoft` prefix, namely: + +- `dynamsoft-camera-enhancer` +- `dynamsoft-capture-vision-bundle` +- `dynamsoft-capture-vision-router` +- `dynamsoft-capture-vision-std` +- `dynamsoft-code-parser` +- `dynamsoft-core` +- `dynamsoft-document-normalizer` +- `dynamsoft-image-processing` +- `dynamsoft-label-recognizer` +- `dynamsoft-license` +- `dynamsoft-utility` + +Place all these directories directories in the location of your choice on your web server, in the same parent directory. Take note of the path to the parent directory, as later you must configure the library to use these resources over the default CDN-hosted resources. + +#### Serve over HTTPS + +When deploying your web application for production, you must serve it over a **secure HTTPS connection**. We require this for the following reasons: + +1. **Browser Security Restrictions** – Most browsers only allow access to camera video streams in a secure context. + > [!NOTE] + > Some browsers like Chrome may grant access to camera video streams for `http://127.0.0.1`, `http://localhost`, or even pages opened directly from the local file system (`file:///...`). This can be helpful during development and testing. + +2. **Dynamsoft License Requirements** – A secure context is required for **Dynamsoft licenses** to function properly. + +#### Set MIME Type + +Next, configure your server to send the correct `Content-Type` header for `wasm` files by setting the MIME type for `.wasm` as `application/wasm`. This allows the user's browser to correctly processes resource files. + +Different web servers have their own way of configuring the MIME type. Here are instructions for some popular web servers: + +- [Apache](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess#media_types_and_character_encodings) +- [IIS](https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap) +- [NGINX](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types) + +#### Configure `engineResourcePaths` + +The library uses the [`engineResourcePaths`]({{ site.api }}document-scanner.html#engineresourcepaths) configuration property locate library resources by pointing to the location of the resources on your web server. Set `rootDirectory` within `engineResourcePaths` to the path of the parent directory containing all the resource modules. The string should terminate with a `/`, e.g. `path/to/resources/`. + ## Hello World Sample Explained Let’s walk through the code in the Hello World Sample to understand how it works. From 1bcc2414c45758b7f73a192242f8d806def64fe9 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:13:41 -0700 Subject: [PATCH 21/28] fix: syntax --- guides/document-scanner.md | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/guides/document-scanner.md b/guides/document-scanner.md index 4b3cfda..46eec06 100644 --- a/guides/document-scanner.md +++ b/guides/document-scanner.md @@ -18,7 +18,7 @@ description: Dynamsoft Document Scanner User Guide > [!NOTE] > See it in action with the [Dynamsoft Document Scanner Demo](https://demo.dynamsoft.com/document-scanner/). -This guide walks you through building a web application that scans single-page documents using **DDS**, with pre-defined configurations. +This guide walks you through building a web application that scans single-page documents using **DDS** with pre-defined configurations. ## License @@ -316,7 +316,7 @@ Alternatively, the script can be referenced from a CDN: **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. > [!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-Hosting Resource File](#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-Host Resources](#self-host-resources). ### Instantiate DDS From 46c63cf569f999d48169f470745cdcbb06734a93 Mon Sep 17 00:00:00 2001 From: dynamsoft-h <172081603+dynamsoft-h@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:12:57 -0700 Subject: [PATCH 28/28] add: DDS release notes --- release-notes/document-scanner.md | 149 ++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) diff --git a/release-notes/document-scanner.md b/release-notes/document-scanner.md index 2def145..d3653df 100644 --- a/release-notes/document-scanner.md +++ b/release-notes/document-scanner.md @@ -11,3 +11,152 @@ permalink: /release-notes/document-scanner.html --- # Document Scanner Release Notes + +## 1.2.0 (30/04/2025) + +# Release Notes + +### Features + +- `DocumentScanner` configuration options + - `ScannerViewConfig` + - `enableAutoCropMode?: boolean; // False by default` + - `enableSmartCaptureMode?: boolean; // False by default` + - `showSubfooter`: Toggle showing the sub-footer container that allows users to toggle scan modes (Detect border, Smart capture, Auto crop). `true` by default + - `showPoweredByDynamsoft`: Toggle showing `Powered by Dynamsoft` message on the scanner view. `true` by default + - `minVerifiedFramesForAutoCapture`: Change the minimum verified frames to auto capture the document. `2` frames are needed by default. Lower this number to make the capture faster (this could have an effect on accuracy/quality of image scanned). + - `scanRegion`: allows users to set a scan region while scanning a document + +``` +export interface ScanRegion { + ratio: { + width: number; + height: number; + }; // Ratio of the scan region + regionBottomMargin: number; // Bottom margin calculated in pixel. This will "push" the scan region upwards + style: { + strokeWidth: number; // width of the scan region border + strokeColor: string; // color of the scan region border + }; +} +``` + - Added `Re-take` button in Correction View. this will allow users to retake/rescan the document through the correction view. + - Provide landscape support for the Document Scanner View (implemented in`document-scanner.ui.html`) + - Template optimization: Updated `scaleDownThreshold` to `1000` + - Allow `launch()` with a static image. A sample is provided under `sample/scenarios/use-file-input.html` + - Set the default resolution when opening camera to `2K` resolution + +### Fixes + +- Enable `OutputOriginalImage` on the template by default. Before, it required us to enable it manually if we use a custom template. +- Set `engineResourcePaths` before `initLicense` to prevent a bug when a user implements a custom engineResourcePath. +- Update trial license banner link to lead to `https://www.dynamsoft.com/customer/license/trialLicense?product=mwc&deploymenttype=web` + +### Dependencies + +- [Dynamsoft Capture Vision JavaScript 2.6.1000](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/release-notes/dcvb.html#261000-01032025) + - Dynamsoft Camera Enhancer 4.1.1 + - Dynamsoft Document Normalizer 2.6.11 + + +## 1.1.1 (07/02/2025) + +### Fixes + +- Fixed icon not showing up on Firefox mobile + +### Dependencies + +- [Dynamsoft Capture Vision JavaScript 2.6.1000](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/release-notes/dcvb.html#261000-01032025) + - Dynamsoft Camera Enhancer 4.1.1 + - Dynamsoft Document Normalizer 2.6.11 + +## 1.1.0 (07/02/2025) + +### Features + +- `DocumentScanner` configuration options + - View Control + - `showCorrectionView`: Toggle correction view visibility and workflow + - `showResultView`: Togle result view visibility and workflow + - UI Changes + - Hidden `DocumentCorrectionView` -> `Smart Capture` button hidden on `DocumentScannerView` + - Hidden `DocumentResultView` -> `Apply` changes to `Done` in `DocumentCorrectionView` + - Resource Configuration + - `engineResourcePaths`: to configure DCV engine resources + - `templateFilePath`: set template file location +- Added `EnumDDSViews` enum (Scanner/Result/Correction) + +### Fixes + +- Fixed button state issues with hidden views +- Fixed `container` type flexibility in `DocumentScannerViewConfig` + +### Dependencies + +- [Dynamsoft Capture Vision JavaScript 2.6.1000](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/release-notes/dcvb.html#261000-01032025) + - Dynamsoft Camera Enhancer 4.1.1 + - Dynamsoft Document Normalizer 2.6.11 + +## 1.0.3 (07/02/2025) + +### Fixes + +- Fixed missing devDependency in `package.json`. + +### Dependencies + +- [Dynamsoft Capture Vision JavaScript 2.6.1000](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/release-notes/dcvb.html#261000-01032025) + - Dynamsoft Camera Enhancer 4.1.1 + - Dynamsoft Document Normalizer 2.6.11 + +## 1.0.2 (05/02/2025) + +### BREAKING CHANGES + +- Renamed `ScanResultView` to `DocumentResultView`. +- Renamed `DocumentScanResult` to `DocumentResult`. +- Renamed `scanResultViewConfig` to `resultViewConfig`. +- Renamed `ControlButton` to `ToolbarConfig`. +- Changed `text` property for toolbar buttons to `label`. + +### New Features + +- Added support for `` tags on toolbar icons. +- Updated the **Share PNG** icon to match other products. +- Added an **upload button** when users specify the `onUpload` function. + +### Fixes + +- Fixed an issue where importing an image larger than the canvas dimensions caused the detected border to be positioned incorrectly. This was due to **scaleDown** not working properly. + +### Samples + +#### Features + +- Added a **rotate message** on `/demo.html` to handle landscape mode. + +#### Fixes + +- Fixed an issue where the **camera and resolution outline logic** would break when transitioning from the **Demo Camera** to the **Live Camera**. + +### Built-in Server + +- Changed the configuration to allow showcasing the **"Upload"** feature. +- Added URLs to specific pages when running `npm run serve`. + +### Dependencies + +- [Dynamsoft Capture Vision JavaScript 2.6.1000](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/release-notes/dcvb.html#261000-01032025) + - Dynamsoft Camera Enhancer 4.1.1 + - Dynamsoft Document Normalizer 2.6.11 + +## 1.0.0 (27/01/2025) + +Initial release + +### Dependencies + +- [Dynamsoft Capture Vision JavaScript 2.6.1000](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/release-notes/dcvb.html#261000-01032025) + - Dynamsoft Camera Enhancer 4.1.1 + - Dynamsoft Document Normalizer 2.6.11