How to upgrade to the latest version

This page in versions:

This page is for the developers who have an application based on version 12 of Dynamic Web TWAIN and wish to upgrade it to version 13.

If you do not have the barcode reading or webcam capture add-ons.

 

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. [On the development machine] 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}];
    Dynamsoft.WebTwainEnv.ProductKey = '8******;t******';
  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.

 

If you have either the barcode reading add-on or the webcam capture add-on

  • If you have the barcode reading add-on 

 

From version 13.0, the barcode add-on has been replaced with the independent Dynamsoft Barcode Reader. To upgrade this part of the code. The steps are

  1. Install Dynamsoft Barcode Reader
  2. Add the DBR resources directory /DBRResources/ to your project
  3. In your code,  remove script tag for the old JS
    <script src="Resources/addon/dynamsoft.webtwain.addon.barcode.js"></script>
  4. Add tags for the JS for Dynamsoft Barcode Reader
    <script src="DBRResources/dynamsoft.barcodereader.config.js"></script>
    <script src="DBRResources/dynamsoft.barcodereader.initiate.js"></script>
  5. Add DBR license in dynamsoft.barcodereader.config.js
     dynamsoft.dbrEnv.productKey= 't00851wAAAE0i1oSQCkHhEd3OJni5zbHP3JKuBTWT6KKpTjiOxxj8SKSY9U7IA4vwUnzoEPndWGJSC30/p4g10eFUPHwuVFrYJDvhWoLiFUp4owk9eSwrrQ==';
  6. Remove the code to detect and download Barcode Reader add-on, instead, put in the code to initialize Dynamsoft Barcode Reader
    dynamsoft.dbrEnv.init(onInitSuccess, onInitFailure);
    function onInitSuccess() {
      dbrObject = new dynamsoft.dbrEnv.BarcodeReader();
    }
  7. Use dbrObject to replace the code where you were using DWObject.Addon.Barcode in the past
  8. Debug your code and make more adjustments to make sure the upgrade is successful.

 

We recommend that you refer to the latest sample for the upgrade.

 

  • If you have the Webcam Capture add-on

 

From version 13.0, the webcam add-on has been replaced with the independent Dynamsoft Camera SDK. To upgrade this part of the code. The steps are

  1. Install Dynamsoft Camera SDK
  2. Add the DCS resources directory /DCSResources/ to your project
  3. In your code,  remove script tag for the old JS
    <script src="Resources/addon/dynamsoft.webtwain.addon.webcam.js"></script>
  4. Add tags for the JS for Dynamsoft Camera SDK
    <script src="DCSResources/dynamsoft.camera.config.js"></script>
    <script src="DCSResources/dynamsoft.camera.initiate.js"></script>
  5. Add DCS license in dynamsoft.camera.config.js
     dynamsoft.dcsEnv.productKey= 't00851wAAAE0i1oSQCkHhEd3OJni5zbHP3JKuBTWT6KKpTjiOxxj8SKSY9U7IA4vwUnzoEPndWGJSC30/p4g10eFUPHwuVFrYJDvhWoLiFUp4owk9eSwrrQ==';
  6. Remove the code to detect and download webcam add-on, instead, put in the code to initialize Dynamsoft Camera SDK
    dynamsoft.dcsEnv.init('video-container', 'image-container', onInitSuccess, onInitFailure);
    function onInitSuccess(videoViewerId, imageViewerId) {
      dcsObject = dynamsoft.dcsEnv.getObject(videoViewerId);
      imageViewer = dcsObject.getImageViewer(imageViewerId);
    }
    
  7. Use dcsObject to replace the code where you were using DWObject.Addon.Webcam in the past
  8. Debug your code and make more adjustments to make sure the upgrade is successful.

 

We recommend that you refer to the latest sample for the upgrade.

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


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.
      
      <!--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>
      
    2. 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);
      //})();
    3. 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’);
      …
      }
    4. Find and replace

      DWObject.attachEvent(...

      with

      DWObject.RegisterEvent(...

    5. 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.