Skip to content

Commit f7ce391

Browse files
authored
Merge pull request #261 from dynamsoft-docs/preview
add upgrade guide
2 parents f23b54c + d9a4869 commit f7ce391

File tree

7 files changed

+60
-5
lines changed

7 files changed

+60
-5
lines changed

_data/full_tree.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tree_file_list:
77
- sidelist-apis.html
88
- sidelist-releasenotes.html
99
- sidelist-faq.html
10+
- sidelist-upgrade-guide.html
1011
- sidelist-full-tree.html
1112
- sidelist-apis-v1.0.0.html
1213
- sidelist-apis-v1.1.html

_includes/sidelist-full-tree.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-ui.html" -%}
66
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-apis.html" -%}
77
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-releasenotes.html" -%}
8-
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-faq.html" -%}
8+
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-faq.html" -%}
9+
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-upgrade-guide.html" -%}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<li><a href="{{ site.firstLevelUrl }}/upgrade-guide/index.html" class="otherLinkColour">Upgrade Guide</a></li>

faq/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: default-layout
33
needAutoGenerateSidebar: true
44
needGenerateH3Content: true
55
noTitleIndex: true
6-
title: Dynamic Web TWAIN SDK FAQ
6+
title: Dynamsoft Document Viewer FAQ
77
keywords: Documentation, Dynamsoft Document Viewer, FAQ
88
breadcrumbText: FAQ
99
description: Dynamsoft Document Viewer Documentation FAQ

index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ description: Dynamsoft Document Viewer Documentation Homepage
5757
- [Update UI dynamically]({{ site.ui }}customize/dynamically.html)
5858
- [API Reference]({{ site.api }}index.html)
5959
- [Release Notes]({{ site.releasenotes }}index.html)
60-
- [FAQ]({{ site.faq }}index.html)
60+
- [FAQ]({{ site.faq }}index.html)
61+
- [Upgrade Guide](/upgrade-guide/index.md)

ui/default_ui.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Default UiConfig:
3434
type: Dynamsoft.DDV.Elements.Layout,
3535
flexDirection: "column",
3636
className: "ddv-edit-viewer-mobile",
37-
children: [{
37+
children: [
38+
{
3839
type: Dynamsoft.DDV.Elements.Layout,
3940
className: "ddv-edit-viewer-header-mobile",
4041
children: [
@@ -83,7 +84,8 @@ Default UiConfig:
8384
type: Dynamsoft.DDV.Elements.Layout,
8485
flexDirection: "column",
8586
className: "ddv-edit-viewer-desktop",
86-
children: [{
87+
children: [
88+
{
8789
type: Dynamsoft.DDV.Elements.Layout,
8890
className: "ddv-edit-viewer-header-desktop",
8991
children: [{

upgrade-guide/index.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
layout: default-layout
3+
needAutoGenerateSidebar: true
4+
needGenerateH3Content: true
5+
noTitleIndex: true
6+
title: Upgrade Guide Dynamsoft Document Viewer Documentation
7+
keywords: Documentation, Dynamsoft Document Viewer, Upgrade
8+
breadcrumbText: Upgrade Guide
9+
description: Upgrade guide for Dynamsoft Document Viewer
10+
---
11+
12+
# Upgrade Guide
13+
14+
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:
15+
16+
* Changes of APIs
17+
* Changes of [`UIConfig`](/api/interface/uiconfig.md)
18+
19+
20+
There are some code snippets that are frequently used and we will talk about the changes you have to make.
21+
22+
## Initialization of Edit Viewer
23+
24+
In v2.x, you can use an additional options parameter to enable the annotation icon in the default UI.
25+
26+
```js
27+
const editViewer = new Dynamsoft.DDV.EditViewer({
28+
container: "container",
29+
uiConfig: Dynamsoft.DDV.getDefaultUiConfig("editViewer", {includeAnnotationSet: true}),
30+
});
31+
```
32+
33+
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:
34+
35+
```js
36+
const editViewer = new Dynamsoft.DDV.EditViewer({
37+
container: "container"
38+
});
39+
```
40+
41+
## Default UI Config
42+
43+
The default UI elements may be different across different versions. Check out [this post](/ui/default_ui.md) to learn about the default configs.
44+
45+
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.
46+
47+
## Getting the Page Data
48+
49+
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.

0 commit comments

Comments
 (0)