This repository contains the source code for the official demo of the Dynamsoft Barcode Reader JavaScript SDK (hereafter called "the library").
You can visit the official demo at https://demo.dynamsoft.com/barcode-reader-js/.
The application is based on Vue, a progressive framework for building user interfaces. You can follow the steps below to run the application.
Make sure you have node, yarn and Vue CLI installed.
node 14.16.0,yarn 1.22.10and@vue/cli 4.5.11are used in the example below.
yarn
yarn serve
You will notice that the barcode results are not complete and sometimes the location is not accurate, both issues are due to the lack of a valid license. The next step shows you how to apply for a trial license and use it.
Sign up and request a trial license in the Dynamsoft Customer Portal. Make sure to choose "Dynamsoft Barcode Reader" and "JavaScript Web SDK".
Once you get the trial license, you can use it by specifying your organization ID in the application.
Open the file "/src/dbr.js" and specify your organization ID like this:
DBR.BarcodeReader.organizationID = "Your-Organization-ID";That's it. Recompile to test again and you will see the barcode reading working properly.
NOTE
The trial license is fetched from Dynamsoft License Server at runtime, so please make sure your device has network connection.