How to deploy integrated Dynamic Web TWAIN project

 

Dynamic Web TWAIN SDK is a client running SDK, so the deployment project does not need to install any software on the server side, and there are no restrictions on the server's operating system. The role of the server is to save the SDK Resources , and provided when needed. No matter which Web server you use, you must ensure that the server is properly set up the following MIME type:

extension name MIME type Specifies the version is set to buy
.css text/css All versions
.js application/javascript All versions
.zip application/x-zip-compressed All versions
.cab application/vnd.ms-cab-compressed ActiveX version
.exe application/octet-stream ActiveX version
.msi application/octet-stream HTML5 Windows version
.pkg application/pkg-mac HTML5 macOS version
.rpm audio/x-pn-realaudio-plugin HTML5 Linux version
.deb application/x-debian-package

HTML5 Linux version

 

The following lists how to deploy integrated Dynamic Web TWAIN project to the server.

In its simplest sample - HelloWorld deployment case study

The Integrated Resources and Resource good HelloWorld pages copied packets to the server at the same time the path to be deployed ../{Project} Directory , can. Then you can directly access HelloWorld.html page.

The deployment is complete!

 

In this case the folder is located Resources '../{Project Directory}' , if it is required to change the location of Resources folder at deployment or renamed, follow these steps:

E.g. placed '../{Project Directory} / Newfolder' under, and rename ResourcesTest .

Make sure the original 'Resources' folder structure remains unchanged.

Step 1: Change the page referenced relative path js file, for example HelloWorld.html in:

The reference to the red box original Resources statement folder js file amended as follows:

<script type="text/javascript" src="Newfolder/ResourcesTest/dynamsoft.webtwain.initiate.js"></script>
<script type="text/javascript" src="Newfolder/ResourcesTest/dynamsoft.webtwain.config.js"></script>

Step 2: In ResourcesTest / dynamsoft.webtwain.config.js file, add or uncomment the following line:

The original Code

Dynamsoft.WebTwainEnv.ResourcesPath ='Resources';

amend as below:

Dynamsoft.WebTwainEnv.ResourcesPath ='Newfolder/ResourcesTest';

Complete the modification step. At this point, the resources required for a project file from '../{Project Directory} / Newfolder / ResourcesTest ' extract.

 

 

It is worth noting that the page references js path and dynamsoft.webtwain.config.js in Dynamsoft.WebTwainEnv.ResourcesPath need to be consistent, and the path to the resource bundle.

For example, the page references a relative path:

<script type="text/javascript" src="../Newfolder/ResourcesTest/dynamsoft.webtwain.initiate.js"></script>
<script type="text/javascript" src="../Newfolder/ResourcesTest/dynamsoft.webtwain.config.js"></script>

Then dynamsoft.webtwain.config.js the need to set:

Dynamsoft.WebTwainEnv.ResourcesPath ='../Newfolder/ResourcesTest';

the above. If you are in the process of deployment, encountered other problems, please leave a message in the comments, or by clicking Contact Contact:

Released six original articles · won praise 0 · Views 1377

Guess you like

Origin blog.csdn.net/weixin_44795817/article/details/100080586