Builder
Builder
OCR WebSDK instance builder for using OCR WebSDK
build
Builds the SDK interface that can be started and destroyed.
build(): OCRSDK;Returns:
| Type | Description | 
|---|---|
| OCRSDK | the 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:
| Name | Type | Description | 
|---|---|---|
| count | number | the maximum attempt for the OCR extraction | 
Returns:
| Type | Description | 
|---|---|
| Builder | this builder | 
setContent
Sets the text content of the SDK to the desired text. Usually used for translation.
setContent(content: OCRContentConfiguration): Builder;Parameters:
| Name | Type | Description | 
|---|---|---|
| content | OCRContentConfiguration | the text and image content to replace | 
Returns:
| Type | Description | 
|---|---|
| Builder | this builder | 
setProxyMiddleware
Sets the endpoint url proxy collection to be used for the SDK.
setProxyMiddleware(proxy: ProxyMiddleware): Builder;Parameters:
| Name | Type | Description | 
|---|---|---|
| proxy | ProxyMiddleware | endpoint proxy collection to be used | 
Returns:
| Type | Description | 
|---|---|
| Builder | this builder | 
setTheme
Sets the theme configuration for the SDK.
setTheme(theme: OCRThemeConfiguration): Builder;Parameters:
| Name | Type | Description | 
|---|---|---|
| theme | OCRThemeConfiguration | theme configurations | 
Returns:
| Type | Description | 
|---|---|
| Builder | this builder | 
setURL
Sets the SDK base path for starting the SDK.
setURL(url: string): Builder;Parameters:
| Name | Type | Description | 
|---|---|---|
| url | string | the SDK base path | 
Returns:
| Type | Description | 
|---|---|
| Builder | this builder | 
setProcessingFlow
Sets SDK processing flow whether async or async
setProcessingFlow(processingFlow: number): Builder;Parameters:
| Name | Type | Description | 
|---|---|---|
| processingFlow | ProcessingFlow | processing flow configuration | 
Returns:
| Type | Description | 
|---|---|
| Builder | this builder | 
Updated about 2 months ago
