Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
Dev Center
Table of contents

Deploy your application on the server

Once you have finished integrating DWT in your application, you can deploy it on your server to test it. As far as DWT is concerned, all related files are to be served as static files which makes the deployment very easy.

If you are using the OCR feature on the server side, please refer to Use OCRPro on the Server Side or Use OCRB on the Server Side.

Make sure the static files can be served correctly

DWT comes with lots of static resources files, for the full list, check out What are the Resources files. The following table shows each file type and its MIME type which must be configured in your webserver in order for that type of file(s) to be correctly served to the client browsers.

File Type MIME Type Required by
.js application/javascript All Browsers
.css text/css All Browsers
.wasm application/wasm WASM Browsers
.msi application/octet-stream Browsers on Windows
.pkg application/pkg-mac Browsers on macOS
.deb application/x-debian-package Browsers on Linux
.rpm application/x-redhat-package-manager Browsers on Linux

How to set the MIME type

Different servers are configured differently. Here are some popular ones:

NGINX: mime.types IIS: Web.config Java™ EE web app: web.xml Node.js: npm mime

Enable HTTPS

If you need to use any of the following features, you must enable HTTPS on the server.

  • Use the new Camera module
  • Upload or Download via SSL
  • Any other features that require a secure connection

For how to enable HTTPS, please check out the manual of your webserver.

Set ResourcesPath

The global API Dynamsoft.WebTwainEnv.ResourcesPath sets a relative or absolute path that tells DWT where to look for the resources files at runtime. Its default value is Resources which means all these files are put in a directory called Resources that is in the same location as the web page on which DWT is running. This is the simplest situation possible, in most cases, it’s a lot more complicated and you must make sure the correct value is set.

How to know ResourcesPath is wrong

When you set ResourcesPath wrong, static files such as dynamsoft.webtwain.install.js , dynamsoft.viewer.css will fail to load and you see 404 errors in the browser console.

Using an absolute path

In some cases, you might not be able to calculate the correct relative path for these files and wishes to use an absolute path instead such as “https://www.dynamsoft.com/dwt/demo/resources/”. This is supported but keep in mind that if you want to use the new Camera module or run DWT in the WASM mode, you must make sure the absolute path stays in the same domain to avoid cross-origin issues.

Is this page helpful?

YesYes NoNo

In this article:

version 16.2

  • Latest Version
  • Version 17.2.1
  • Version 17.1.1
  • Version 17.0
  • Version 16.2
  • Version 16.1.1
Change +
© 2003–2022 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support