Dev Center
Table of contents

How to Upgrade DBR-JS From v7.x To v9.x

Change your license

Your v7.x license is not compatible with v9.x, you must Contact Dynamsoft Sales Team to acquire a new license key. If you have a subscription license or you have valid maintenance for a perpetual license, the upgrade is free of charge.

Update the version number if you are using a CDN

   <script src=""></script>

If you have deployed the library files to your own server, download the latest version and replace the old files.

Update the API you use for licensing the SDK

In v7.x, you probably licensed the SDK with “data-productKeys” like this:

   <script src="" data-productKeys="PRODUCT-KEYS"></script>

In v9.x, use the API license instead:

      Dynamsoft.DBR.BarcodeScanner.license = 'YOUR-NEW-LICENSE-KEY';

Breaking Changes

:exclamation: Namespace change

Use the new namespace Dynamsoft.DBR in place of just Dynamsoft. The following shows the equivalent changes for BarcodeScanner and BarcodeReader:

Dynamsoft.BarcodeScanner -> Dynamsoft.DBR.BarcodeScanner
Dynamsoft.BarcodeReader -> Dynamsoft.DBR.BarcodeReader

If you are using the library as an ES/CMD module, you don’t need to change your code.Otherwise, you can make a global change from Dynamsoft to Dynamsoft.DBR in your code.

API Changes

After changing the namespace, check your code and see if you are using any of the APIs in the first column below. If found, change them to the equivalent shown in the second column:

API Name Notes
Dynamsoft.DBR.detectEnvironment() Use Dynamsoft.DBR.BarcodeReader.detectEnvironment() instead.
Dynamsoft.DBR.engineResourcePath Use Dynamsoft.DBR.BarcodeReader.engineResourcePath instead.
Dynamsoft.DBR.isLoaded() Use Dynamsoft.DBR.BarcodeReader.isWasmLoaded() instead.
Dynamsoft.DBR.loadWasm() Use Dynamsoft.DBR.BarcodeReader.loadWasm() instead.
Dynamsoft.DBR.productKeys Use Dynamsoft.DBR.BarcodeReader.license instead.
Dynamsoft.DBR.version Use Dynamsoft.DBR.BarcodeReader.version instead.
destroy() Use destroyContext() instead.
bDestroyed Use isContextDestroyed() instead.
onUnduplicatedRead Use onUniqueRead instead.
bPlaySoundOnSuccessfulRead Use whenToPlaySoundforSuccessfulRead in ScanSettings instead.
soundOnSuccessfulRead Use soundOnSuccessfullRead in ScanSettings instead.
bSaveOriCanvas Use ifSaveOriginalImageInACanvas instead.
oriCanvas Use getOriginalImageInACanvas() instead.

deblurLevel is Deprecated

deblurLevel has been replaced with deblurModes.

Check out the code below on how to switch from deblurLevel to deblurModes.

let settings = await barcodeScanner.getRuntimeSettings();
//settings.deblurLevel = 9;
settings.deblurModes = ["DM_DIRECT_BINARIZATION",   
await barcodeScanner.updateRuntimeSettings(settings);

Changed Class Names of the Built-in UI elements

If you manipulated any of the built-in UI elements which are located by their class names, you need to update the class name(s) used in your code.

v7.x in dbr.scanner.html v9.x in dbr.ui.html
dbrScanner-bg-loading dce-bg-loading
dbrScanner-bg-camera dce-bg-camera
dbrScanner-video dce-video
dbrScanner-cvs-scanarea dce-scanarea
dbrScanner-scanlight dce-scanlight
dbrScanner-sel-camera dce-sel-camera
dbrScanner-sel-resolutio dce-sel-resolution
dbrScanner-btn-close dce-btn-close

Other changes

The file dbr.scanner.html has been renamed to dbr.ui.html.

If you are still having issue with the upgrade, please contact us.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(10.2.10)
    • Version 10.x
      • Version 10.0.21
      • Version 10.0.20
    • Version 9.x
      • Version 9.6.42
      • Version 9.6.40
      • Version 9.6.33
      • Version 9.6.32
      • Version 9.6.31
      • Version 9.6.30
      • Version 9.6.21
      • Version 9.6.20
      • Version 9.6.11
      • Version 9.6.10
      • Version 9.6.2
      • Version 9.6.1
      • Version 9.6.0
      • Version 9.3.1
      • Version 9.3.0
      • Version 9.2.13
      • Version 9.2.12
      • Version 9.2.11
      • Version 9.0.2
      • Version 9.0.1
      • Version 9.0.0
    • Version 8.x
      • Version 8.8.7
      • Version 8.8.5
      • Version 8.8.3
      • Version 8.8.0
      • Version 8.6.3
      • Version 8.6.0
      • Version 8.4.0
      • Version 8.2.5
      • Version 8.2.3
      • Version 8.2.1
      • Version 8.2.0
      • Version 8.1.3
      • Version 8.1.2
      • Version 8.1.0
      • Version 8.0.0
    • Version 7.x
      • Version 7.6.0
      • Version 7.5.0
    Change +