Skip to main content

DocutainSDK

Methods

initSDK()

initSDK(licenseKey): Promise<boolean>

Initializes the Docutain SDK. This method needs to be called prior to using any functionality of the Docutain SDK.

Parameters

ParameterTypeDescription
licenseKeystringyour Docutain SDK license key.

Returns

Promise\<boolean>

true if initialization was successful, false otherwise. Use getLastError() to retrieve error message.


getLastError()

getLastError(): Promise<string>

This method returns the latest error message, if any error occurred.

Returns

Promise\<string>

the error message.


scanBarcode()

scanBarcode(options): Promise<Barcode>

Starts the barcode scanner.

Parameters

ParameterTypeDescription
optionsBarcodeScannerConfigurationan instance of BarcodeScannerConfiguration.

Returns

Promise\<Barcode>

the detected Barcode or null, if scan process was canceled.