Skip to main content

Utilities | Web Document 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 under utils 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 application
  • saveImageAsJpeg(data: Uint8Array, name?: string) - A function to save a scanned document as a JPEG file. It accepts the document as a Uint8Array data and an optional argument name to be used as a resulting file name. The default value of name 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 License

What do you think of this documentation?