From 8659a8a8a6a0ad7632ec76a6e492bcff4b5f9527 Mon Sep 17 00:00:00 2001 From: Tony-Dynamsoft <112376616+tony-xlh@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:21:47 +0800 Subject: [PATCH 1/7] enable preview build --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f486e0..dfad6bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: push: branches: - main - #- preview + - preview # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -30,4 +30,4 @@ jobs: with: doc-repo: document-viewer-docs doc-url: document-viewer/docs/ - secrets: inherit \ No newline at end of file + secrets: inherit From 1c91ce6c8ac609eb5ed9adc88984325e052dd71b Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 3 Dec 2025 15:21:31 +0800 Subject: [PATCH 2/7] update FAQ title --- faq/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faq/index.md b/faq/index.md index fa33004..a01fd3c 100644 --- a/faq/index.md +++ b/faq/index.md @@ -3,7 +3,7 @@ layout: default-layout needAutoGenerateSidebar: true needGenerateH3Content: true noTitleIndex: true -title: Dynamic Web TWAIN SDK FAQ +title: Dynamsoft Document Viewer FAQ keywords: Documentation, Dynamsoft Document Viewer, FAQ breadcrumbText: FAQ description: Dynamsoft Document Viewer Documentation FAQ From 06e68006a3ac3c355361e6b8d4ba413c1bebadb0 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 3 Dec 2025 16:23:04 +0800 Subject: [PATCH 3/7] add upgrade guide --- _includes/sidelist-full-tree.html | 3 +- _includes/sidelist-upgrade-guide.html | 1 + index.md | 3 +- upgrade-guide/index.md | 48 +++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 _includes/sidelist-upgrade-guide.html create mode 100644 upgrade-guide/index.md diff --git a/_includes/sidelist-full-tree.html b/_includes/sidelist-full-tree.html index d2ad7e8..c0429c3 100644 --- a/_includes/sidelist-full-tree.html +++ b/_includes/sidelist-full-tree.html @@ -5,4 +5,5 @@ {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-ui.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-apis.html" -%} {%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%} -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-faq.html" -%} \ No newline at end of file +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-faq.html" -%} +{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-upgrade-guide.html" -%} \ No newline at end of file diff --git a/_includes/sidelist-upgrade-guide.html b/_includes/sidelist-upgrade-guide.html new file mode 100644 index 0000000..13ee824 --- /dev/null +++ b/_includes/sidelist-upgrade-guide.html @@ -0,0 +1 @@ +
  • Upgrade Guide
  • \ No newline at end of file diff --git a/index.md b/index.md index f11ef62..19689c0 100644 --- a/index.md +++ b/index.md @@ -57,4 +57,5 @@ description: Dynamsoft Document Viewer Documentation Homepage - [Update UI dynamically]({{ site.ui }}customize/dynamically.html) - [API Reference]({{ site.api }}index.html) - [Release Notes]({{ site.releasenotes }}index.html) -- [FAQ]({{ site.faq }}index.html) \ No newline at end of file +- [FAQ]({{ site.faq }}index.html) +- [Upgrade Guide](/upgrade-guide/index.md) \ No newline at end of file diff --git a/upgrade-guide/index.md b/upgrade-guide/index.md new file mode 100644 index 0000000..8e138c5 --- /dev/null +++ b/upgrade-guide/index.md @@ -0,0 +1,48 @@ +--- +layout: default-layout +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +title: Upgrade Guide Dynamsoft Document Viewer Documentation +keywords: Documentation, Dynamsoft Document Viewer, Upgrade +breadcrumbText: Upgrade Guide +description: Upgrade guide for Dynamsoft Document Viewer +--- + + +Upgrading Dynamsoft Document Viewer from an old version to the latest version (v3.x as of now) is straightforward. You need to pay attention to the following changes: + +* Changes of APIs +* Changes of [`UIConfig`](/api/interface/uiconfig.md) + + +There are some code snippets that are frequently used and we will talk about the changes you have to make. + +## Initialization of Edit Viewer + +In v2.x, you can use an additional options parameter to enable the annotation icon in the default UI. + +```js +const editViewer = new Dynamsoft.DDV.EditViewer({ + container: "container", + uiConfig: Dynamsoft.DDV.getDefaultUiConfig("editViewer", {includeAnnotationSet: true}), +}); +``` + +In v3.x, the option is removed and the annotation icon is included in the default UI. So you can just initialize it with the following code: + +```js +const editViewer = new Dynamsoft.DDV.EditViewer({ + container: "container" +}); +``` + +## Default UI Config + +The default UI elements may be different across different versions. Check out [this post](/ui/default_elements.md) to learn about the default configs. + +You can try to unify the UI across versions by specifying the [`UIConfig`](/api/interface/uiconfig.md). But pay attention to supported elements of different versions. + +## Getting the Page Data + +Before v3.x, [`getPageData()`](/api/interface/idocument/index.md#getpagedata) returns a promise object, which was time consuming as it required getting all the image blobs. In v3.x, it directly returns an [`IPageData`](/api/interface/ipagedata.md) object and you can retrieve image blobs with its functions. From c12368a2dc8fe15a48f6a0fef170a717d2d9544e Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 3 Dec 2025 16:30:07 +0800 Subject: [PATCH 4/7] update links in upgrade guide --- upgrade-guide/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade-guide/index.md b/upgrade-guide/index.md index 8e138c5..e8a53e7 100644 --- a/upgrade-guide/index.md +++ b/upgrade-guide/index.md @@ -39,9 +39,9 @@ const editViewer = new Dynamsoft.DDV.EditViewer({ ## Default UI Config -The default UI elements may be different across different versions. Check out [this post](/ui/default_elements.md) to learn about the default configs. +The default UI elements may be different across different versions. Check out [this post](/ui/default_ui.md) to learn about the default configs. -You can try to unify the UI across versions by specifying the [`UIConfig`](/api/interface/uiconfig.md). But pay attention to supported elements of different versions. +You can try to unify the UI across versions by specifying the [`UIConfig`](/api/interface/uiconfig.md). But pay attention to supported [elements](/ui/default_elements.md) of different versions. ## Getting the Page Data From ac87ddabc9b090b0fd0c65267fb42d40843d14e4 Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 3 Dec 2025 16:40:21 +0800 Subject: [PATCH 5/7] update indent in default_ui.md --- ui/default_ui.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/default_ui.md b/ui/default_ui.md index 4e89df0..5c282be 100644 --- a/ui/default_ui.md +++ b/ui/default_ui.md @@ -34,7 +34,8 @@ Default UiConfig: type: Dynamsoft.DDV.Elements.Layout, flexDirection: "column", className: "ddv-edit-viewer-mobile", - children: [{ + children: [ + { type: Dynamsoft.DDV.Elements.Layout, className: "ddv-edit-viewer-header-mobile", children: [ @@ -83,7 +84,8 @@ Default UiConfig: type: Dynamsoft.DDV.Elements.Layout, flexDirection: "column", className: "ddv-edit-viewer-desktop", - children: [{ + children: [ + { type: Dynamsoft.DDV.Elements.Layout, className: "ddv-edit-viewer-header-desktop", children: [{ From 3a9035eab4b957177757faa8f2774c33a14feabe Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 3 Dec 2025 16:44:36 +0800 Subject: [PATCH 6/7] add upgrade guide to full tree --- _data/full_tree.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/_data/full_tree.yml b/_data/full_tree.yml index c225358..655fc59 100644 --- a/_data/full_tree.yml +++ b/_data/full_tree.yml @@ -7,6 +7,7 @@ tree_file_list: - sidelist-apis.html - sidelist-releasenotes.html - sidelist-faq.html + - sidelist-upgrade-guide.html - sidelist-full-tree.html - sidelist-apis-v1.0.0.html - sidelist-apis-v1.1.html From d9a4869b6af8ee8573e83fa81db909b0fbe1192c Mon Sep 17 00:00:00 2001 From: tony-xlh Date: Wed, 3 Dec 2025 16:47:06 +0800 Subject: [PATCH 7/7] add title for upgrade guide --- upgrade-guide/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/upgrade-guide/index.md b/upgrade-guide/index.md index e8a53e7..0b73968 100644 --- a/upgrade-guide/index.md +++ b/upgrade-guide/index.md @@ -9,6 +9,7 @@ breadcrumbText: Upgrade Guide description: Upgrade guide for Dynamsoft Document Viewer --- +# Upgrade Guide Upgrading Dynamsoft Document Viewer from an old version to the latest version (v3.x as of now) is straightforward. You need to pay attention to the following changes: