Builder

Builder

OCR WebSDK instance builder for using OCR WebSDK

build

Builds the SDK interface that can be started and destroyed.

build(): OCRSDK;

Returns:

TypeDescription
OCRSDKthe SDK interface

inspect

Inspects the passed configuration for debugging.

inspect(): void;

setAttemptCount

Sets the maximum attempt for the OCR extraction while the SDK is running

setAttemptCount(count: number): Builder;

Parameters:

NameTypeDescription
countnumberthe maximum attempt for the OCR extraction

Returns:

TypeDescription
Builderthis builder

setContent

Sets the text content of the SDK to the desired text. Usually used for translation.

setContent(content: OCRContentConfiguration): Builder;

Parameters:

NameTypeDescription
contentOCRContentConfigurationthe text and image content to replace

Returns:

TypeDescription
Builderthis builder

setProxyMiddleware

Sets the endpoint url proxy collection to be used for the SDK.

setProxyMiddleware(proxy: ProxyMiddleware): Builder;

Parameters:

NameTypeDescription
proxyProxyMiddlewareendpoint proxy collection to be used

Returns:

TypeDescription
Builderthis builder

setTheme

Sets the theme configuration for the SDK.

setTheme(theme: OCRThemeConfiguration): Builder;

Parameters:

NameTypeDescription
themeOCRThemeConfigurationtheme configurations

Returns:

TypeDescription
Builderthis builder

setURL

Sets the SDK base path for starting the SDK.

setURL(url: string): Builder;

Parameters:

NameTypeDescription
urlstringthe SDK base path

Returns:

TypeDescription
Builderthis builder

setProcessingFlow

Sets SDK processing flow whether async or async

setProcessingFlow(processingFlow: number): Builder;

Parameters:

NameTypeDescription
processingFlowProcessingFlowprocessing flow configuration

Returns:

TypeDescription
Builderthis builder