Utilities | Web Barcode Scanner
In addition to numerous view and image processing functions, Scanbot Web SDK also features various utility functions.
Please note that utilities are available after initialization, under the instance returned by initialize
,
therefore, if ScanbotSDK initialization fails, utilities are not available either.
isCameraSupported()
– Checks whether the browser or device supports camera access. Please note that this functionality is specifically located underutils
because ScanbotSDK cannot guarantee the reliability of this functionality. Browsers and their functions are, by design, not backward compatible or future-proof. In niche situations (browsers, devices) it is bound to produce false positives. Other SDK features (import image, apply a filter, etc. are still available even if the camera is not)flash()
– Simple flash animation that you can call in the detection callback to add a bit of flare to your applicationsaveImageAsJpeg(data: Uint8Array, name?: string)
- A function to save a scanned document as a JPEG file. It accepts the document as a Uint8Arraydata
and an optional argumentname
to be used as a resulting file name. The default value ofname
is a randomly generated file name with a.jpeg
extension
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.