The QiTechWebOCR.WebOCR() constructor
The .WebOCR method is responsible for configuring the instance of your documentoscopy component. This method presents the following configurations.
| Name | Description | Required |
|---|---|---|
| htmlComponent | Parent HTML component that will house the SDK HTML. | Yes |
| webToken | Client key that identifies that the collected data comes from your application. If you have not yet received your web-token, contact support. | Yes |
| sessionId | Used to define the key that identifies the session started in the SDK. It is used to track the entire flow traversed by the user in the Web OCR execution through logs. This field accepts a string of up to 255 characters. Must be unique for each session. | Yes |
| .setThemeConfiguration(object) | Method used to customize the visual identity of the WebOCR element components. | No |
| .setShowInstructionScreen(boolean) | Method used to render the introduction screen with tips for capturing the selected document. Receives true or false. If not used, the default is true. | No |
| .setShowSuccessScreen(boolean) | Method used to render the success screen at the end of the capture process. Receives true or false. If not used, the default is true. | No |
| .setSandboxEnvironment() | Method used to configure the environment for Sandbox mode. If not used, the default is Production. | No |
The .setThemeConfiguration method must receive an object with the following fields:
| name | type | description |
|---|---|---|
| companyLogo | String | (recommended) Path or public URL of your company logo asset (PNG). If not provided, the default is a placeholder. |
| buttonColor | String | (recommended) Hexadecimal color of the screen buttons. If not provided, the default is #1C49AD. |
| fontColor | String | (recommended) Hexadecimal color of the texts shown on the screen. If not provided, the default is #FCFCFC. |
| backgroundColor | String | (recommended) Hexadecimal color of the screen background. If not provided, the default is #1C49AD. |
| fontFamily | String | (recommended) Name of the Font Family to be configured in the SDK texts. If not provided, a default font will be configured. |