Skip to content

Commit 837db05

Browse files
authored
Merge pull request #168 from RachyJ/patch-15
Update upgrade.md
2 parents d75d3cf + 005df6b commit 837db05

File tree

1 file changed

+30
-122
lines changed

1 file changed

+30
-122
lines changed

indepth/development/upgrade.md

Lines changed: 30 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: default-layout
33
needAutoGenerateSidebar: true
4+
noTitleIndex: true
45
title: Dynamic Web TWAIN Development - Upgrade Guide
56
keywords: Dynamic Web TWAIN, Documentation, Development, Upgrade Guide
67
breadcrumbText: Upgrade Guide
@@ -9,157 +10,64 @@ description: Dynamic Web TWAIN SDK Documentation Upgrade Guide Page
910

1011
# Upgrade
1112

12-
This upgrade section talks about how to upgrade Dynamic Web TWAIN to the latest version.
13+
This upgrade section talks about how to upgrade Dynamic Web TWAIN to a newer version.
1314

14-
#### IMPORTANT
15+
## How to upgrade
1516

16-
Please be aware of the following namespace changes introduced in version 17.0.
17+
You can follow the steps below to upgrade Dynamic Web TWAIN:
1718

18-
| v17.0+ |v16.2- |
19-
|:-|:-|
20-
|`Dynamsoft.DWT` |`Dynamsoft.WebTwainEnv`|
21-
|`Dynamsoft.DWT.EnumDWT_` |`Dynamsoft.EnumDWT_`|
22-
|`Dynamsoft.DBR.EnumBarcodeFormat` |`Dynamsoft.EnumBarcodeFormat`|
19+
1. Back up your current copy of `dynamsoft.webtwain.config.js`.
2320

24-
More barcode enumeration can be found <a href="https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/enum/EnumBarcodeColourMode.html?ver=latest" target="_blank">here</a>
21+
2. On your development machine, uninstall the old version of Dynamic Web TWAIN and install the new one.
2522

26-
Please review our <a href="{{site.info}}schedule/stable.html" target="_blank">changelog</a> for all breaking changes.
23+
3. Get the new **Resources** folder under the installation folder of Dynamic Web TWAIN and update the folder in your application. Use your original `dynamsoft.webtwain.config.js` if you want to keep the old settings.
2724

28-
Please refer to <a href="{{site.info}}schedule/deprecated.html" target="_blank">this list</a> for all deprecated features.
25+
Typical paths of Dynamic Web TWAIN folder:
2926

30-
## Update the resources files
27+
* **Windows**: `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK {Version Number}\`
28+
* **macOS**: `Applications > Dynamsoft > Dynamic Web TWAIN SDK {Version Number}`
3129

32-
The resources files refer to the Resources folder in the installation directory, C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK 17.0. For more details, you can check <a href="{{site.indepth}}faqs/general/what-are-the-resources-files.html" target="_blank">here</a>
30+
4. Make necessary updates to the related code.
3331

34-
### Regular Web application
32+
If you get a new **license key** for the new version, you may follow the steps in <a href="{{site.info}}about/license.html">License</a> to update it.
3533

36-
#### Uninstall the old version
34+
And you can check the <a href="{{site.info}}schedule/stable.html">Release Notes</a> to learn the changes in the new version.
3735

38-
* **Windows**: Search `Dynamic Web TWAIN` in `Control Panel -> Programs and Features` , and remove all the relevant components there.
36+
> Note: Please be aware of the following namespace changes introduced in v17.0:
3937
40-
* **macOS**: Execute `Applications > Dynamsoft > Dynamic Web TWAIN SDK {Version Number} > Uninstall.pkg`
38+
> | v17.0+ |v16.2- |
39+
> |:-|:-|
40+
> |`Dynamsoft.DWT` |`Dynamsoft.WebTwainEnv`|
41+
> |`Dynamsoft.DWT.EnumDWT_` |`Dynamsoft.EnumDWT_`|
42+
> |`Dynamsoft.DBR.EnumBarcodeFormat` |`Dynamsoft.EnumBarcodeFormat`|
4143
42-
#### Install the new version
44+
5. Deploy the new version files to your server and test.
4345

44-
You can use the <a href="{{site.about}}resources.html#how-to-get-dwt" target="_blank"> official installer</a> to install the new verion.
46+
For Dynamic Web TWAIN v16.0 and later, Dynamsoft Service is designed to be backward compatible. Once you upgrade Dynamic Web TWAIN for your application on the server side, for **end users' side**
4547

46-
<a href="https://www.dynamsoft.com/web-twain/downloads" class="downloadBtn fr textUpperCase">Download SDK</a>
48+
- If the end users have installed the same version or newer minor versions of Dynamsoft Service, they don't need to do anything;
49+
- If the end users have never installed Dynamsoft Service, have an older version or a different newer major version of it, they will be required to do a reinstallation of Dynamsoft Service. The process is described <a href="{{site.indepth}}deployment/service.html#how-to-install-dwt">here</a>
4750

48-
#### Replace the resources files
51+
## Update `dwt` package
4952

50-
If you haven't renamed the official folder, the resources files should reside in a folder named "Resources". In this step, copy the new resources files and replace the old ones. The new files are typically found in the following location after the installation
53+
If your application uses a framework or library like Angular, React, Vue, etc. and uses the `dwt` package, you can just install the new version of Dynamic Web TWAIN to replace the old one and update the types definition as well. For example:
5154

52-
* **Windows**: `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK {Version Number}\`
53-
* **macOS**: `Applications > Dynamsoft > Dynamic Web TWAIN SDK {Version Number}`
54-
55-
### Applications that make use of the `dwt` package
56-
57-
If your application uses a framework or library like `Angular` , `React` , `Vue` , etc., the upgrade is easier as you just need to install the new version to replace the old one. For example
55+
For npm:
5856

5957
``` cmd
6058
npm install dwt
6159
```
6260

63-
or
64-
6561
``` cmd
66-
yarn add dwt
62+
npm install @types/dwt
6763
```
6864

69-
You may want to update the types definition as well
65+
For Yarn:
7066

7167
``` cmd
72-
npm install @types/dwt
68+
yarn add dwt
7369
```
7470

75-
or
76-
7771
``` cmd
7872
yarn add @types/dwt
79-
```
80-
81-
## Update the Product Key
82-
83-
The Product Key needs to be updated when your current license is no longer valid (expired, for example) or when you upgrade across major versions. The Product Key is set using the global API `Dynamsoft.DWT.ProductKey` and the change is only effective before <a href="{{site.indepth}}features/initialize.html#creating-the-webtwain-instance" target="_blank">creating `WebTwain` instances</a>
84-
85-
In most cases, you can just make the change in the file `dynamsoft.webtwain.config.js` .
86-
87-
``` javascript
88-
// If you have multiple license keys, just separate them with semicolons.
89-
Dynamsoft.DWT.ProductKey = 't0076lQAAAGNcO61He******;t0076lQAAAGNcO61He******';
90-
```
91-
92-
If it is set elsewhere, you need to find it and replace it. For example, if you are making use of the [dwt package](https://www.npmjs.com/package/dwt) (`dynamsoft.webtwain.min.js` or `dynamsoft.webtwain.min.mjs`), the file `dynamsoft.webtwain.config.js` doesn't exist and you should already have the above line of code in your own JavaScript where you can update the license when needed.
93-
94-
But if you are using <a href="https://www.dynamsoft.com/Products/WebTWAIN_License.aspx#per_browser_client" target="_blank">Per Client Device License </a>, you need to use <a href="{{site.info}}api/Dynamsoft_WebTwainEnv.html#organizationid" target="_blank">organizationID</a>
95-
96-
``` javascript
97-
Dynamsoft.DWT.organizationID = "123456"; // replace the number 123456 with YOUR-ORGANIZATION-ID.
98-
//Note: organizationID and ProductKey cannot be used together
99-
```
100-
101-
Please note that this licensing model is only supported from `DWT` 17.0 and needs to be used with Dynamsoft License Server (`DLS` for short). See more about <a href="https://www.dynamsoft.com/license-server/docs/about/terms.html?ver=latest#dynamsoft-license-server" target="_blank">What is a DLS</a>
102-
103-
## Update `Dynamsoft Service` on the client-side
104-
105-
### Service mode
106-
107-
Starting in version 16.*, `Dynamsoft Service` is designed to be backward compatible (unfortunately, just as far back as 16.0). The compatibility is done in two ways
108-
109-
* For minor versions like 16.1 to 16.2, if the newer version of `Dynamsoft Service` has been installed on a desktop, websites utilizing both the newer version and the older version can work without reinstallation of `Dynamsoft Service`
110-
* For major versions like 16.* to 17.*, the newer version will be installed to a different directory which can coexist with the service directory of the old version. The user can choose to uninstall the old version if necessary
111-
112-
That means, once you, as the maintainer, have finished upgrading your application to a newer `Dynamic Web TWAIN` on the server side, the clients could face one of two situations
113-
114-
* If the clients have installed the same or even newer minor version of `Dynamsoft Service` themselves (probably from another application that uses `Dynamic Web TWAIN` ), they don't need to do anything;
115-
* If the clients never installed `Dynamsoft Service` or have an older version or a different new major version of it, they will be required to do a reinstallation of `Dynamsoft Service`. The process is described <a href="{{site.indepth}}deployment/service.html#how-to-install-dwt" target="_blank">here</a>
116-
117-
### WASM mode
118-
119-
By comparison, if `Dynamic Web TWAIN` runs only in the <a href="{{site.indepth}}features/initialize.html#wasm-mode" target="_blank">WASM mode</a>, the clients don't need to install anything themselves as the <a href="{{site.getstarted}}platform.html#wasm-browsers" target="_blank">WASM browsers</a> will take care of the upgrade process. What the clients may encounter is a slower-than-usual page load when they visit the application for the first time after the upgrade.
120-
121-
Once upgraded, the old WASM files will continue to exist in the browser as cached data until it's purged by the browser or by the user.
122-
123-
## Other Topics
124-
125-
### Expand your application to mobile platforms
126-
127-
If you are upgrading to version 17 for mobile functionality (basically, `DWT` in <a href="{{site.indepth}}features/initialize.html#wasm-mode" target="_blank">WASM mode</a>, there are some considerations to be made. As mobile support is one of the newest offerings from Dynamsoft, not all of the old `DWT` features are fully available at present. That said, we are constantly working on increasing the supported mobile feature set, so we recommend reviewing our <a href="{{site.info}}schedule/stable.html" target="_blank">release notes</a>, and if you have any questions, contact <a href="{{site.about}}getsupport.html" target="_blank">Dynamsoft Support</a>
128-
129-
As an example for how some existing `DWT` features will work on <a href="{{site.getstarted}}platform.html#browsers-on-mobile-devices" target="_blank">mobile platforms</a>
130-
131-
#### Scanning
132-
133-
This will become either capturing from mobile cameras or <a href="{{site.indepth}}features/input.html#how-to-enable-remote-scan" target="_blank">capturing from a Remote Windows machine</a> in the LAN.
134-
135-
#### Loading
136-
137-
This will be either loading or capturing.
138-
139-
#### Saving
140-
141-
This will become an in-browser download operation as mentioned <a href="{{site.indepth}}features/output.html#save-as-a-download" target="_blank">here</a>
142-
143-
#### Editing
144-
145-
Similar to existing desktop functionality but the performance is not as good.
146-
147-
#### Uploading
148-
149-
Similar to existing desktop browser functionality but is limited to only one API <a href="{{site.info}}api/WebTwain_IO.html#httpupload" target="_blank">`HTTPUpload()`</a>
150-
151-
#### Viewing
152-
153-
Identical to current desktop browser functionality.
154-
155-
#### Barcode reading
156-
157-
Identical to current desktop browser functionality.
158-
159-
#### PDF Handling
160-
161-
Similar to current desktop browser functionality but the rasterizing feature depends on embeded fonts in the PDF file whereas the on desktop, the system fonts can also be used.
162-
163-
#### OCR
164-
165-
Client-side support is to be added in a later version.
73+
```

0 commit comments

Comments
 (0)