Class TextPatternScannerViewConfiguration

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.

mirrored?: boolean
ocrConfiguration?: {
    maximumNumberOfAccumulatedFrames?: number;
    minimumNumberOfRequiredFramesWithEqualScanningResult?: number;
    ocrResolutionLimit?: number;
    validator?: ({ readonly _type?: "DefaultContentValidator"; allowedCharacters?: string; _marker?: () => void; }) | ({ readonly _type?: "PatternContentValidator"; allowedCharacters?: string; pattern?: string; matchSubstring?: boolean; patternGrammar?: PatternGrammar; _marker?: () => void; });
}

Type declaration

  • Optional maximumNumberOfAccumulatedFrames?: number

    Maximum number of accumulated frames to inspect before actual result is returned.

    Default Value

    3;
    
  • Optional minimumNumberOfRequiredFramesWithEqualScanningResult?: number

    Minimum number of accumulated frames that have equal result.

    Default Value

    2;
    
  • Optional ocrResolutionLimit?: number

    Maximum image size (height or width) for OCR process. 0 - do not rescale.

    Default Value

    0;
    
  • Optional validator?: ({ readonly _type?: "DefaultContentValidator"; allowedCharacters?: string; _marker?: () => void; }) | ({ readonly _type?: "PatternContentValidator"; allowedCharacters?: string; pattern?: string; matchSubstring?: boolean; patternGrammar?: PatternGrammar; _marker?: () => void; })

    Content validator.

    Default Value

    new DefaultContentValidator({});
    
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

onTextDetected?: TextDetectionCallback
preferredCamera?: string

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

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

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

    Returns void

Generated using TypeDoc