ebs.ocr

(FintechOS Studio 20.2.1 and later)

Extracts text fields from an identity document scan stored in the file upload location.

IMPORTANT!  
This function requires the Computer Vision automation processor to be installed on your environment.

Syntax

Copy
function ebs.ocr(realFileName: string, callback: any, errorCallback: any): void;
 
Parameter Type Description
realFileName string Name of the identity document file that will be processed, including the file extension.
callback function Callback function to run on the returned fields.
errorCallback (optional) function Callback function to run in case of failure.

Return Value

Returns the extracted text fields in a JSON object that can be used as input for the callback function. This may vary depending on the OCR service provider and type of document.

For example:

Copy
{ Message: null, IsSuccess: true, ClientScript: null, ErrorCode: 0, LastName: "Doe", GivenName: "Johnathan", DocumentNumber: "123456789", BirthDate: "1960-01-01", ExpiryDate … }

Examples