ptc-iot-sharing / ThingworxBarcodeScannerWidget

Client-side barcode scanner widget for Thingworx.
6 stars 3 forks source link

Barcode reader widget

This repository contains a Thingworx widget allowing reading of barcodes within the browser. Both file inputs, as well as modern webcam grabbing is supported. The underlying technology behind this widget is QuaggaJS2. QuaggaJS is a barcode-scanner entirely written in JavaScript supporting real- time localization and decoding of various types of barcodes such as EAN, CODE 128, CODE 39, EAN 8, UPC-A, UPC-C, I2of5, 2of5, CODE 93 and CODABAR. The library is also capable of using getUserMedia to get direct access to the user’s camera stream. Although the code relies on heavy image-processing even recent smartphones are capable of locating and decoding barcodes in real-time.

How to use it

By default, this is a non-reposive widget, with a text input that can be customized via CSS and a button. The wodget can also be completely hidden, and the StartDetection service can be used to start the detection based on external events. The widgets offers two functioning modes, driven by the Mode widget property. This modes dictate what happens when clicking on the button, or when triggering the StartDetection service.

To understand most of the widget properties, either read the description or go to the library website.

Building and publishing

The following commands allow you to build and compile your widget: