TsgcAIDocumentExtractor › Events › OnOCRFallback

OnOCRFallback Event

Fired when the vision request fails and the extraction falls back to the local OCR.

Syntax

property OnOCRFallback: TsgcAIDocumentOCRFallbackEvent;
// TsgcAIDocumentOCRFallbackEvent = procedure(Sender: TObject; const aError: string) of object

Default Value

—

Remarks

Raised when OCRMode is domFallback, the vision request failed and the component is about to extract the data from the text of the local OCR. aError is the message of the failed request.

Example

procedure TForm1.oExtractorOCRFallback(Sender: TObject; const aError: string);
begin
  Memo1.Lines.Add('Vision failed, using OCR: ' + aError);
end;

Back to Events