×
MENU
@ViewData["CurrentPage"]
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

JavaScript API Reference - BarcodeReader Accessors

Accessors Description
engineResourcePath Gets or sets the engine (WASM) location.
productKeys Gets or sets the Dynamsoft Barcode Reader SDK product keys.
version Gets current version.
licenseServer Gets or sets the URL of the license server(s) used for authentication and tracking.
handshakeCode Gets or sets the handshake code to interact with the license server(s).
sessionPassword Gets or sets the session password of the handshake code set in license tracking server.

engineResourcePath

Get or set the Barcode Reader SDK engine path. The path should lead to a folder containing the distributed JS and WASM files.

engineResourcePath = value

Property Value

value string

Sample

Dynamsoft.DBR.BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.0.0/dist/";

await Dynamsoft.DBR.BarcodeReader.loadWasm();

productKeys

Get or set the Barcode Reader SDK product key. From version 8.0, the product key can also be a handshakeCode. Please visit our user portal to obtain a trial license.

get

productKeys() returns string

Return Value

string

set

productKeys(value) returns void

Parameters

value string

Return Value

void

Sample

In the

<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@@8.0.0/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>

In JavaScript

Dynamsoft.DBR.BarcodeReader.productKeys = "1000**601-1000***44"; // Set the handshakeCode

version

Get the currently used version of Barcode Reader SDK.

version returns string

Return Value

string

licenseServer

Gets or sets the URL of the license tracking server used to authenticate the license (handshakeCode) and track barcode reading usage. When set to null (default value), it will connect to Dynamsoft’s license tracking servers for online verification. A self hosting option is available. Learn more about License Tracking Server 2.0. Set this API before calling createInstance.

get

licenseServer() returns string

Return Value

string

set

licenseServer(value) returns void

Parameters

value string

Return Value

void

Sample

Dynamsoft.DBR.BarcodeReader.licenseServer = ["https://your.mainServer.com", "https://your.backupServer.com"];

await Dynamsoft.DBR.BarcodeReader.loadWasm();

handshakeCode

Get or set the handshakeCode. Learn more about What is handshakeCode. Set this API before calling createInstance.

The API productKeys can be used to set the handshakeCode as well but we recommend using this new API instead.

get

handshakeCode() returns string

Return Value

string

set

handshakeCode(value) returns void

Parameters

value string

Return Value

void

Sample

Dynamsoft.DBR.BarcodeReader.handshakeCode = "1000**601-1000***44";

sessionPassword

Get or set the session password used for authentication of the license (handshake code) associated with the application. Learn more about session password in License Tracking Server 2.0. Set this API before calling createInstance.

get

sessionPassword() returns string

Return Value

string

set

sessionPassword(value) returns void

Parameters

value string

Return Value

void

Sample

Dynamsoft.DBR.BarcodeReader.sessionPassword = "MyPassw0rd";
await Dynamsoft.DBR.BarcodeReader.loadWasm();

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest Version
  • version 8.0
  • version 7.6
  • version 7.5
Change +
© 2003–2020 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support