Scanner

Scanner

Class for invoking methods on a Scanner

Constructor

new Scanner(baseURLopt, pluginId)

Description:
  • Instantiate a Generic Scanner

Source:
See:
  • CanonScanner
Example
const scanner = new Scanner('capture_scanner_windows')
Parameters:
Name Type Attributes Description
baseURL string <optional>

Protocol, domain, and port for the service.

pluginId string

The Id of the desired plugin to use for this scanner instance. The plugin must support the "devices", and "capture" methods.

Methods

(async) scan(captureOptopt, deviceOptopt)

Description:
  • Scan a document

Source:
Example
// Scan document as an ArrayBuffer and add it to an img tag appended to
// the document's body.
const img = document.createElement('img')
img.src = await scanner.scan()
document.body.appendChild(img)
Parameters:
Name Type Attributes Description
captureOpt CaptureOptions <optional>

Additional options for capturing a signature.

deviceOpt string | object <optional>

Can a document using either a specific Device ID or a Device Object. The default is the first available device.