From 52ccd06c9aee3ee15eca05cc2450683d943828ae Mon Sep 17 00:00:00 2001 From: h-dynamsoft <172081603+dynamsoft-h@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:13:32 -0700 Subject: [PATCH 1/3] Chores and fixes (#97) * chore: remove VS Code config * chore: update .gitignore for local builds * chore: fix .gitignore * chore: fix .gitignore * remove ignored templates * chore: fix whitespace and EOF newline * chore: fix .gitignore * chore: remove extra .editorconfig * fix: release notes linking * fix: rename release notes sidelist * fix: rename release notes sidelist --------- Co-authored-by: Tom Kent --- .editorconfig | 59 ---- .github/workflows/full-site-build.yml | 12 +- .github/workflows/main.yml | 8 +- .gitignore | 41 ++- .vscode/settings.json | 1 - README.md | 2 +- _config.yml | 90 +++--- _data/full_tree.yml | 4 +- _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-release-notes.html | 1 + _includes/sidelist-releasenotes.html | 1 - _layouts/default-layout-OLD.html | 100 ------ _layouts/home-page.html | 50 --- _layouts/search-page-OLD.html | 284 ------------------ 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 +++--- 60 files changed, 406 insertions(+), 879 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .vscode/settings.json create mode 100644 _includes/sidelist-release-notes.html delete mode 100644 _includes/sidelist-releasenotes.html 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/.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 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/.gitignore b/.gitignore index f14b74d..4f9e1ef 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/js/setLatestVersion.js +assets/scripts/ +assets/css/ + +# Includes +_includes/productNav/ +_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 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 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..fe0b774 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/ + +release-notes: /mobile-web-capture/docs/release-notes/ + +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..0612ff8 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -2,8 +2,8 @@ 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 - - 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..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" -%} \ No newline at end of file +{%- 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 cd1476b..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" -%} \ No newline at end of file +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-release-notes.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-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
  • diff --git a/_includes/sidelist-releasenotes.html b/_includes/sidelist-releasenotes.html deleted file mode 100644 index c731573..0000000 --- a/_includes/sidelist-releasenotes.html +++ /dev/null @@ -1 +0,0 @@ -
  • Release Notes
  • \ No newline at end of file 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 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..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) \ No newline at end of file +- [Release notes]({{ site.release-notes }}index.html) diff --git a/index.md b/index.md index 2fe96f1..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) \ No newline at end of file +- [Release notes]({{ site.release-notes }}mobile-web-capture.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 6f62f41d6b061cdb98dc9e3fc50e957bd5c95667 Mon Sep 17 00:00:00 2001 From: h-dynamsoft <172081603+dynamsoft-h@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:09:02 -0700 Subject: [PATCH 2/3] Staging (#98) - Clean up repo - Fix GitHub actions - Fix formatting and syntax - Add MWC framework sample and link --------- Co-authored-by: Tom Kent --- .github/workflows/main.yml | 6 +++--- _config.yml | 1 + _data/full_tree.yml | 1 + _includes/sidelist-code-gallery.html | 5 +++++ _includes/sidelist-full-tree-v2.0.html | 10 +++++----- _includes/sidelist-full-tree.html | 4 +--- code-gallery/frameworks.md | 26 ++++++++++++++++++++++++++ index.md | 2 ++ introduction/index.md | 2 +- 9 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 _includes/sidelist-code-gallery.html create mode 100644 code-gallery/frameworks.md diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9137b0c..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: @@ -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/ 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..afa9ce1 --- /dev/null +++ b/_includes/sidelist-code-gallery.html @@ -0,0 +1,5 @@ +
  • Code Gallery + +
  • 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 241f2ba..e75dce5 100644 --- a/_includes/sidelist-full-tree.html +++ b/_includes/sidelist-full-tree.html @@ -1,7 +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" -%} diff --git a/code-gallery/frameworks.md b/code-gallery/frameworks.md new file mode 100644 index 0000000..59da7b1 --- /dev/null +++ b/code-gallery/frameworks.md @@ -0,0 +1,26 @@ +--- +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 +permalink: /code-gallery/frameworks.html +--- + +# 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: + +### Mobile Web Capture + +- [Angular](https://github.com/Dynamsoft/mobile-web-capture/tree/master/samples/frameworks/angular) 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) 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 81a1497cfa48a8072efe3d5b93a762954334c005 Mon Sep 17 00:00:00 2001 From: h-dynamsoft <172081603+dynamsoft-h@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:32:07 -0700 Subject: [PATCH 3/3] Add MWC react and vue samples (#100) * chore: remove VS Code config * chore: update .gitignore for local builds * chore: fix .gitignore * chore: fix .gitignore * remove ignored templates * chore: fix whitespace and EOF newline * chore: fix .gitignore * chore: remove extra .editorconfig * fix: release notes linking * fix: rename release notes sidelist * fix: rename release notes sidelist * chore: use main branch Docs-Template-Repo for preview CI * fix: allow preview CI on push to preview branch * add: code gallery and web framework samples * fix: MWC v2.0 sidelist * fix: code gallery links * fix: web framework links * sample: add MWC react and vue samples --------- Co-authored-by: Tom Kent --- code-gallery/frameworks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code-gallery/frameworks.md b/code-gallery/frameworks.md index 59da7b1..af00f05 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) \ No newline at end of file