├── .browserslistrc ├── .eslintrc.js ├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html └── resources │ └── dwt │ ├── dynamsoft.webtwain.min.js │ └── dynamsoft.webtwain.min.mjs └── src ├── App.vue ├── assets ├── logo.png └── logo.svg ├── components ├── DWT.vue ├── HelloWorld.vue └── panel │ ├── OCR.vue │ ├── Scan.vue │ ├── Viewer.vue │ └── Webcam.vue ├── main.js └── plugins └── vuetify.js /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | 25 | public/ 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dwt-vue 2 | 3 | ## Project Description 4 | 5 | dwt-vue is a document scanning web app which uses Dynamic Web TWAIN and Vue.js technologies. It can provides scan, webcam capture, and OCR features to end users. 6 | 7 | ![dwt-vue app screenshot](https://www.dynamsoft.com/codepool/wp-content/uploads/2020/09/component_dwt-final_deliverable-1000x494.png) 8 | 9 | ### Dynamic Web TWAIN 10 | 11 | Dynamic Web TWAIN is a commercial development SDK that caters to TWAIN standard for web developers. Besides the functionalities provided by dwt-vue, it can also offer barcode reading and scanning upload features. For more details (introduction, download, demos, trial license), please reach https://www.dynamsoft.com/Products/WebTWAIN_Overview.aspx. 12 | 13 | ## Project document 14 | 15 | [Make a component-based document scanning application](https://www.dynamsoft.com/codepool/vue-document-scanning-app.html) 16 | 17 | ## Project setup 18 | ``` 19 | npm install 20 | ``` 21 | 22 | ### Compiles and hot-reloads for development 23 | ``` 24 | npm run serve 25 | ``` 26 | 27 | ### Compiles and minifies for production 28 | ``` 29 | npm run build 30 | ``` 31 | 32 | ### Lints and fixes files 33 | ``` 34 | npm run lint 35 | ``` 36 | 37 | ### Customize configuration 38 | See [Configuration Reference](https://cli.vuejs.org/config/). 39 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dwt-vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "ncp node_modules/dwt/dist public/resources/dwt && vue-cli-service serve", 7 | "build": "vue-cli-service build && ncp node_modules/dwt/dist public/resources/dwt", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "@mdi/font": "^3.6.95", 12 | "core-js": "^3.6.5", 13 | "dwt": "^16.1.2", 14 | "ncp": "^2.0.0", 15 | "roboto-fontface": "*", 16 | "vue": "^2.6.11", 17 | "vuetify": "^2.2.11" 18 | }, 19 | "devDependencies": { 20 | "@vue/cli-plugin-babel": "~4.5.0", 21 | "@vue/cli-plugin-eslint": "~4.5.0", 22 | "@vue/cli-service": "~4.5.0", 23 | "babel-eslint": "^10.1.0", 24 | "eslint": "^6.7.2", 25 | "eslint-plugin-vue": "^6.2.2", 26 | "vue-cli-plugin-vuetify": "~2.0.7", 27 | "vue-template-compiler": "^2.6.11" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YutongZhang-dynamsoft/dwt-vue/8fd5e8a5f374f5c5c1deaf3b374c4a0f8fe29113/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 32 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YutongZhang-dynamsoft/dwt-vue/8fd5e8a5f374f5c5c1deaf3b374c4a0f8fe29113/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | Artboard 46 2 | -------------------------------------------------------------------------------- /src/components/DWT.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 120 | 121 | -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 93 | 94 | 152 | -------------------------------------------------------------------------------- /src/components/panel/OCR.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 71 | 72 | -------------------------------------------------------------------------------- /src/components/panel/Scan.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 113 | 114 | -------------------------------------------------------------------------------- /src/components/panel/Viewer.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 74 | 75 | 92 | -------------------------------------------------------------------------------- /src/components/panel/Webcam.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import vuetify from './plugins/vuetify'; 4 | import 'roboto-fontface/css/roboto/roboto-fontface.css' 5 | import '@mdi/font/css/materialdesignicons.css' 6 | 7 | Vue.config.productionTip = false 8 | 9 | new Vue({ 10 | vuetify, 11 | render: h => h(App) 12 | }).$mount('#app') 13 | -------------------------------------------------------------------------------- /src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuetify from 'vuetify'; 3 | import 'vuetify/dist/vuetify.min.css'; 4 | 5 | Vue.use(Vuetify); 6 | 7 | export default new Vuetify({ 8 | }); 9 | --------------------------------------------------------------------------------