Class DocumentDataExtractorViewConfiguration

Hierarchy

Constructors

Properties

backgroundColor?: string
container?: HTMLElement

The container HTML element of Scanbot Web SDK camera. Required when 'containerId' property is left undefined when calling any ScanbotSDK createScanner function. If both are provided, 'container' property takes precedence.

containerId?: string

The container HTML element id of Scanbot Web SDK camera. Required when 'container' property is left undefined when calling any ScanbotSDK createScanner function If both are provided, 'container' property takes precedence.

finder?: {
    aspectRatio?: {
        height?: number;
        width?: number;
    };
    minimumInsets?: {
        bottom?: number;
        left?: number;
        right?: number;
        top?: number;
    };
    overlayColor?: string;
    preferredHeight?: number;
    style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
        _type: "FinderCorneredStyle";
    } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
        _type: "FinderStrokedStyle";
    };
    visible?: boolean;
} & {
    _type: "ViewFinderConfiguration";
} | {
    aspectRatio?: {
        height?: number;
        width?: number;
    };
    minimumInsets?: {
        bottom?: number;
        left?: number;
        right?: number;
        top?: number;
    };
    overlayColor?: string;
    preferredHeight?: number;
    style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
        _type: "FinderCorneredStyle";
    } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
        _type: "FinderStrokedStyle";
    };
} & {
    _type: "PermanentViewFinderConfiguration";
}
mirrored?: boolean
onDocumentDetected?: ((result) => void)

Type declaration

onError?: ((e) => void)

Type declaration

    • (e): void
    • Error callback of the SDK. If any error was reported, your scanner might not be scanning anymore, e.g. due to an out-of-memory error.

      Parameters

      • e: any

      Returns void

preferredCamera?: string

Camera id or camera label. A list of available cameras can be obtained from ScanbotSDK.cameras.

scannerConfiguration?: {
    configurations?: ({
        fieldTypeName?: string;
        maxYear?: number;
        minYear?: number;
    } & {
        _type: "DateValidationConfiguration";
    } | {
        expectedCountry?: EuropeanHealthInsuranceCardIssuingCountry;
    } & {
        _type: "EuropeanHealthInsuranceCardConfiguration";
    } | {
        acceptedCountries?: string[];
        acceptedMRZTypes?: MrzDocumentType[];
    } & {
        _type: "MRZFallbackConfiguration";
    } | {
        sensitivityThreshold?: number;
    } & {
        _type: "AutoFocusConfiguration";
    } | {
        glareDetectionThreshold?: number;
    } & {
        _type: "GlareDetectionConfiguration";
    } | {
        acceptedDocumentTypes?: string[];
    } & {
        _type: "DocumentDataExtractorCommonConfiguration";
    })[];
    documentTrustMode?: DocumentTrustMode;
    fieldExcludeList?: string[];
    processingMode?: ProcessingMode;
    resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; };
    returnCrops?: boolean;
}

Type declaration

  • Optional configurations?: ({
        fieldTypeName?: string;
        maxYear?: number;
        minYear?: number;
    } & {
        _type: "DateValidationConfiguration";
    } | {
        expectedCountry?: EuropeanHealthInsuranceCardIssuingCountry;
    } & {
        _type: "EuropeanHealthInsuranceCardConfiguration";
    } | {
        acceptedCountries?: string[];
        acceptedMRZTypes?: MrzDocumentType[];
    } & {
        _type: "MRZFallbackConfiguration";
    } | {
        sensitivityThreshold?: number;
    } & {
        _type: "AutoFocusConfiguration";
    } | {
        glareDetectionThreshold?: number;
    } & {
        _type: "GlareDetectionConfiguration";
    } | {
        acceptedDocumentTypes?: string[];
    } & {
        _type: "DocumentDataExtractorCommonConfiguration";
    })[]

    List of configuration elements for the document data extractor.

    Default Value

    [new DocumentDataExtractorCommonConfiguration({})];
    
  • Optional documentTrustMode?: DocumentTrustMode

    Level of trust in the authenticity of the extracted document.

    Default Value

    "TRUSTED";
    
  • Optional fieldExcludeList?: string[]

    Normalized names of the fields to exclude from the result.

    Default Value

    [];
    
  • Optional processingMode?: ProcessingMode

    Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

    On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

    Default Value

    "AUTO";
    
  • Optional resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }

    Configuration for how to accumulate results.

    Default Value

    new ResultAccumulationConfiguration({});
    
  • Optional returnCrops?: boolean

    If true, crops of the detected documents and fields will be returned in the result.

    Default Value

    false;
    
spinnerColor?: string
userGuidance?: {
    background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; };
    title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; };
    visible?: boolean;
}

Type declaration

  • Optional background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; }

    The background style used for the user guidance.

    Default Value

    new BackgroundStyle({
    "strokeColor": "#00000000",
    "fillColor": "?sbColorSurfaceLow"
    });
  • Optional title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; }

    The title of the user guidance.

    Default Value

    new StyledText({
    "color": "?sbColorOnPrimary"
    });
  • Optional visible?: boolean

    Determines whether the user guidance is visible or not.

    Default Value

    true;
    
videoConstraints?: any

ScanbotCameraView video constraints

zoom?: number

Digital zoom level of the video stream. Defaults to 1.0. Please note that this is not the same as the optical zoom of the camera.

DEFAULT_ACCEPTED_ANGLE_SCORE: number
DEFAULT_ACCEPTED_BRIGHTNESS_SCORE: number
DEFAULT_ACCEPTED_SIZE_SCORE: number
DEFAULT_VIDEO_RESOLUTION_4K: {
    height: number;
    width: number;
}

Type declaration

  • height: number
  • width: number
DEFAULT_VIDEO_RESOLUTION_HD: {
    height: number;
    width: number;
}

Type declaration

  • height: number
  • width: number

Methods

  • Parameters

    • json: {
          backgroundColor?: string;
          container?: { accessKey?: string; readonly accessKeyLabel?: string; autocapitalize?: string; dir?: string; draggable?: boolean; hidden?: boolean; inert?: boolean; innerText?: string; lang?: string; readonly offsetHeight?: number; ... 288 more ...; focus?: (options?: FocusOptions) => void; };
          containerId?: string;
          finder?: {
              aspectRatio?: { readonly width?: number; readonly height?: number; };
              minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
              overlayColor?: string;
              preferredHeight?: number;
              style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderCorneredStyle";
              } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderStrokedStyle";
              };
              visible?: boolean;
          } & {
              _type: "ViewFinderConfiguration";
          } | {
              aspectRatio?: { readonly width?: number; readonly height?: number; };
              minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
              overlayColor?: string;
              preferredHeight?: number;
              style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderCorneredStyle";
              } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderStrokedStyle";
              };
          } & {
              _type: "PermanentViewFinderConfiguration";
          };
          mirrored?: boolean;
          onDocumentDetected?: ((result) => void);
          onError?: ((e) => void);
          preferredCamera?: string;
          scannerConfiguration?: { resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }; ... 4 more ...; processingMode?: ProcessingMode; };
          spinnerColor?: string;
          userGuidance?: { visible?: boolean; title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; }; background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; }; };
          videoConstraints?: any;
          zoom?: number;
      }
      • Optional backgroundColor?: string
      • Optional container?: { accessKey?: string; readonly accessKeyLabel?: string; autocapitalize?: string; dir?: string; draggable?: boolean; hidden?: boolean; inert?: boolean; innerText?: string; lang?: string; readonly offsetHeight?: number; ... 288 more ...; focus?: (options?: FocusOptions) => void; }

        The container HTML element of Scanbot Web SDK camera. Required when 'containerId' property is left undefined when calling any ScanbotSDK createScanner function. If both are provided, 'container' property takes precedence.

      • Optional containerId?: string

        The container HTML element id of Scanbot Web SDK camera. Required when 'container' property is left undefined when calling any ScanbotSDK createScanner function If both are provided, 'container' property takes precedence.

      • Optional finder?: {
            aspectRatio?: { readonly width?: number; readonly height?: number; };
            minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
            overlayColor?: string;
            preferredHeight?: number;
            style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderCorneredStyle";
            } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderStrokedStyle";
            };
            visible?: boolean;
        } & {
            _type: "ViewFinderConfiguration";
        } | {
            aspectRatio?: { readonly width?: number; readonly height?: number; };
            minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
            overlayColor?: string;
            preferredHeight?: number;
            style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderCorneredStyle";
            } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderStrokedStyle";
            };
        } & {
            _type: "PermanentViewFinderConfiguration";
        }
      • Optional mirrored?: boolean
      • Optional onDocumentDetected?: ((result) => void)
      • Optional onError?: ((e) => void)
          • (e): void
          • Error callback of the SDK. If any error was reported, your scanner might not be scanning anymore, e.g. due to an out-of-memory error.

            Parameters

            • e: any

            Returns void

      • Optional preferredCamera?: string

        Camera id or camera label. A list of available cameras can be obtained from ScanbotSDK.cameras.

      • Optional scannerConfiguration?: { resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }; ... 4 more ...; processingMode?: ProcessingMode; }
      • Optional spinnerColor?: string
      • Optional userGuidance?: { visible?: boolean; title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; }; background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; }; }
      • Optional videoConstraints?: any

        ScanbotCameraView video constraints

      • Optional zoom?: number

        Digital zoom level of the video stream. Defaults to 1.0. Please note that this is not the same as the optical zoom of the camera.

    Returns DocumentDataExtractorViewConfiguration

  • Parameters

    • source: any
    • destination: {
          [key: string]: any;
      }
      • [key: string]: any
    • Optional ignore: string[]

    Returns void

Generated using TypeDoc