You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Vue](https://vuejs.org/) is a progressive framework for building user interfaces. Check out the following guide on how to integrate `DWT` into a Vue application.
14
14
15
+
<divclass="multi-panel-switching-prefix"></div>
16
+
17
+
-[Vue](#vue)
18
+
-[Vue 3](#vue3)
19
+
20
+
<divclass="multi-panel-start"></div>
21
+
15
22
## Preparation
16
23
17
24
Make sure you have [node](https://nodejs.org/), [yarn](https://yarnpkg.com/cli/install), and [Vue CLI](https://cli.vuejs.org/) installed. `node 14.4.0` , `yarn 1.22.4`, and `@vue/cli 4.46` are used in the example below.
@@ -203,4 +210,200 @@ If you have installed `DWT` and have configured a valid `ProductKey` . You will
203
210
204
211
You should be able to open a file or capture an image.
205
212
213
+
<divclass="multi-panel-end"></div>
214
+
215
+
<divclass="multi-panel-start"></div>
216
+
217
+
## Preparation
218
+
219
+
The recommended version for Vue and Node is `v3.2.22` and `v16+` respectively.
220
+
221
+
## Create the sample project
222
+
223
+
### Create a bootstrapped raw Vue 3 application
224
+
225
+
Assume the project name is "dwt-vue3"
226
+
227
+
```cmd
228
+
npm init vue@latest
229
+
```
230
+
231
+
### Navigate to the root directory of the application and install the `dwt` and `ncp` package
232
+
233
+
```cmd
234
+
cd dwt-vue3
235
+
```
236
+
237
+
```cmd
238
+
npm install
239
+
```
240
+
241
+
```cmd
242
+
npm install dwt
243
+
```
244
+
245
+
```cmd
246
+
npm install ncp
247
+
```
248
+
249
+
## Configure the project
250
+
251
+
Open `package.json` and change `scripts` as seen below:
> *`containerId` specifies the DIV to create `DWT` viewer, which is defined in the `template`.
368
+
> *`OnWebTwainReady` is the callback triggered when `DWT` initialization succeeds.
369
+
> *`ProductKey` must be set to a valid trial or full key.
370
+
> *`ResourcesPath` is set to the location of the static files mentioned in [Configure the project](#configure-the-project).
371
+
372
+
Change the file /src/App.vue
373
+
374
+
```html
375
+
<scriptsetup>
376
+
importHelloWorldfrom'./components/localScan.vue'
377
+
</script>
378
+
379
+
<template>
380
+
<HelloWorld />
381
+
</template>
382
+
383
+
<stylescoped>
384
+
</style>
385
+
```
386
+
387
+
### Try running the project
388
+
389
+
```cmd
390
+
npm run dev
391
+
```
392
+
393
+
#### On desktop
394
+
395
+
If you have installed `DWT` and have configured a valid `ProductKey` . You will have a working page to scan documents from your scanner now. Otherwise, you should see instructions on [this page]({{site.indepth}}features/initialize.html#installation-of-the-dynamsoft-service) that guides you on installing the library.
396
+
397
+
#### On mobile
398
+
399
+
For Android, the scanners that support ESCL can be used.
0 commit comments