How to upgrade to the latest version

This page in versions:

This page is for the developers.

After you have purchased the licenses for Dynamic Web TWAIN, you only need to follow a few simple steps to upgrade your application to use the full version.

  1. Uninstall the old version/install the new version

    Firstly, uninstall the old version on your development machine from Control Panel -> Programs and Features. Afterward, install the new version.
    For purchased customers, you should've got an email with the download link of the full version installer. If not, please contact sales[at]dynamsoft.com.

  2. Update the Resources folder

    Please go to your application directory, and locate the Resources folder of Dynamic Web TWAIN. Backup this folder and replace it with the new version which is typically found in C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK {Version Number}\

  3. Update the JS files for Licensing and basic configuration

    Open dynamsoft.webtwain.config.js, and update the product key and whether it's trial or full. If you have more than one product keys, please add them into Dynamsoft.WebTwainEnv.ProductKey and split them with semicolons.

    Dynamsoft.WebTwainEnv.Containers = [{ContainerId:'dwtcontrolContainer', Width:270, Height:350}]; 
    // Please note that the license key is not the same thing as the Product Key. 
    //You need to use your license keys to generate a Product Key.
    // For more info about how to generate a product key, please check the reference below.
    Dynamsoft.WebTwainEnv.ProductKey = '88FFAA09C42D5DE******;128A4C7FA5C42D9******';

    Reference: How to generate a product key?

  4. Deploy everything to your Servers.

    Simply copy the new Resources folder and code, and replace the old ones on your test servers, staging servers and production servers.

That's it, you have upgraded to the latest version of Dynamic Web TWAIN.

How to check which version is installed

To check the installed version, the steps are

  1. Open your scan page
  2. Open browser console (normally F12 would do the trick)
  3. Execute DWObject.VersionInfo

You'll see something like

DWObject.VersionInfo
"12, 3, 0, 0328"

If you need any assistance or have any problem, please feel free to contact us

You can also check out a more detailed upgrade guide (PDF) here.

To upgrade Dynamic Web TWAIN from version 9.1, 9.2 to 11.x/12.x, please refer to the steps below.

  • 1. Re-install and use new Resource files

    Firstly, uninstall the old version on your development machine from Start menu -> Control Panel -> Uninstall a Program.

    NOTE: For non-IE end user (Chrome & Firefox), please also uninstall the component 'Dynamic Web TWAIN Plug-in' from Control Panel before installing the full version.

    Afterwards, install the new version. If you haven't downloaded the installer, you can get it here. If you have purchased, you should've received the download link for the full installer. If not, please contact sales[at]dynamsoft.com.

    After the installation, back-up and remove the old Resources folder from your application and replace it with the new one which is typically found in C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK {Version Number} {Trial}\

  • 2. Update the JS file

      1. In the main scan page, update the JS references as highlighted below.
    <head>
    
    <!--Please put the JS tags into the head tag 
    Reference to the new dynamsoft.webtwain.initiate.js file
    and include the new dynamsoft.webtwain.config.js file -->
    
    <script src="Resources/dynamsoft.webtwain.initiate.js"></script> 
    <script src="Resources/dynamsoft.webtwain.config.js"></script> 
    <script src="Scripts/{your own code}.js"></script> 
    </head>
      1. Comment out _dwtParam and gWebTwain like this:
    //var _dwtParam = {
    // 'productKey': '******',
    // 'containerID': 'dwtcontrolContainer',
    // 'width': _iWidth,
    // 'height': _iHeight,
    … …
    
    // 'onPostTransfer':Dynamsoft_OnPostTransfer,
    //};
    //var gWebTwain;
    //(function() {
    // gWebTwain = new Dynamsoft.WebTwain(_dwtParam);
    //})();
      1. Update the code for initializing Dynamic Web TWAIN

    1). Find and comment out the following line

    //seed = setInterval(controlDetect, 500); 
    … … 
    //DWObject = gWebTwain.getInstance();

    2). Change the function controlDetect to

    // Add the new funtion and new object function 
    Dynamsoft_OnReady() {
    DWObject = Dynamsoft.WebTwainEnv.GetWebTwain(‘dwtcontrolContainer’);
    …
    }
    1. Find and replace

      DWObject.attachEvent(...

      with

      DWObject.RegisterEvent(...

    2. If you see any code similar to 'var DWObject = gWebTwain.getInstance();', remove it.
  • 3. Licensing and basic configuration

    Open the license tool (DWTLicensing.exe) in the installation directory: C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN SDK {Version Number} {Trial}\ Delete old or expired licenses if any, add new licenses and generate a product key.

    Open dynamsoft.webtwain.config.js, and update the basic settings like the size, the product key and whether it's trial or full.

    // Please change the control’s width and height as per your needs.
    Dynamsoft.WebTwainEnv.Containers = [{ContainerId:'dwtcontrolContainer', Width:270, Height:350}]; 
    // Please note that the license key is not the same thing as the Product Key. 
    //You need to use your license keys to generate a Product Key.
    // For more info about how to generate a product key, please check the reference below.
    Dynamsoft.WebTwainEnv.ProductKey = '88FFAA09C42D5DE******;128A4C7FA5C42D9******';

    Reference: How to generate a product key?

  • You have successfully upgrade to the latest version of Dynamic Web TWAIN. If you need any assistance or have any problem, please feel free to contact us.

If you are using Dynamic Web TWAIN 9.0 or older, we suggest that you follow our developer's guide and recreate your scan module using Dynamic Web TWAIN 12.

If you haven't downloaded the installer, you can get it here.

If you have purchased, you should've received the download link for the full installer. If not, please contact sales[at]dynamsoft.com.

For more info, please first check out Dynamic Web TWAIN Developer's Guide.