Skip to content

Commit 06e6800

Browse files
committed
add upgrade guide
1 parent 1c91ce6 commit 06e6800

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

_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>

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)

upgrade-guide/index.md

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