ID Capture

Defined under the namespace Scandit.Datacapture.Id

IdCaptureErrorCode

Added in version 6.15.0

Undefined

Added in version 6.15.0

Undefined error.

RecoveredAfterFailure

Added in version 6.15.0

The process responsible to scan images malfunctioned and was restarted. When scanning both front and back sides, the developer is responsible to reset the scanning process by calling IdCapture.reset() and inform the user to start over with the front side.

InvalidLicenseKeyForVIZProcessing

Added in version 6.16.0

IdCapture is configured with VIZ scanning but the license key does not include VIZ scanning functionality.

InvalidSettingsForVIZProcessing

Added in version 6.16.0

IdCapture settings include at least one document of type VIZ, but VIZ scanning was not enabled when executing idCaptureLoader().

InvalidLicenseKeyForParser

Added in version 6.26.0

License key does not include either IdCaptureMRZ or IdCaptureBarcode when executing IdCapture.parse() with corresponding code.

IdCaptureLoaderOptions
interface IdCaptureLoaderOptions

Added in version 6.16.0

enableVIZDocuments
enableVIZDocuments?: boolean

Added in version 6.16.0

Whether to enable scanning of VIZ document in id capture instances. Default value is false.

Enabling VIZ scanning leads to more code to be downloaded and initialized, making therefore the initialization of the SDK significantly longer. When enabled, the license key must include VIZ scanning functionality.

IdCapture
class IdCapture : DataCaptureMode

Added in version 6.13.0

forContext(context, settings)
static forContext(context: DataCaptureContext | null,
        settings: IdCaptureSettings): Promise<IdCapture>

Added in version 6.13.0

Constructs a new IdCapture with the provided settings. When dataCaptureContext is not null, the mode is automatically added to it.

isEnabled()
isEnabled(): boolean

Added in version 6.13.0

Get DataCaptureMode. See DataCaptureMode.isEnabled().

setEnabled(enabled)
setEnabled(enabled: boolean): Promise<void>

Added in version 6.13.0

Set DataCaptureMode. See DataCaptureMode.setEnabled().

addListener(listener)
addListener(listener: Listener): void

Added in version 6.13.0

Adds the listener to this id capture instance.

In case the same listener is already observing this instance, calling this method will not add the listener again.

removeListener(listener)
removeListener(listener: Listener): void

Added in version 6.13.0

Removes listener from this id capture instance.

In case the listener is not currently observing this instance, calling this method has no effect.

context
get context(): DataCaptureContext | null

Added in version 6.13.0

Implemented from DataCaptureMode. See DataCaptureMode.context.

setFeedback(feedback)
setFeedback(feedback: IdCaptureFeedback): Promise<void>

Added in version 6.19.0

Sets the feedback.

feedback
get feedback(): IdCaptureFeedback

Added in version 6.19.0

Instance of IdCaptureFeedback, determines what feedback (vibration, sound) should be emitted during the ID Capture process.

recommendedCameraSettings()
static get recommendedCameraSettings(): CameraSettings

Added in version 6.13.0

Creates the recommended camera settings to use with this mode.

reset()
reset(): Promise<void>

Added in version 6.13.0

Resets the ongoing scanning process. This method can be used to abandon scanning the back side of a document.

applySettings(settings)
applySettings(settings: IdCaptureSettings): Promise<void>

Added in version 6.18.0

Asynchronously Applies the new settings to the ID Capture. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

parse(code)
parse(code: string): Promise<CapturedId | null>

Added in version 6.26.0

Parses string representations of MRZ and PDF417 barcode raw data. The returned promise will be rejected if an MRZ is parsed and the license key does not include IdCaptureMRZ scanning, or if a PDF417 barcode is parsed and the license key does not include IdCaptureBarcode scanning.

idCaptureLoader(options)
function idCaptureLoader(options?: IdCaptureLoaderOptions): ModuleLoader

Added in version 6.13.0

Use this function to load the ID Capture module when configuring the SDK with Core.configure(). The function must be called and its result must be passed to the option ConfigureOptions.moduleLoaders.