ocrEngineStatus Property

Summary

Status of the OCR engine on the server.

Syntax
TypeScript
JavaScript
Object.defineProperty(ServiceStatus.prototype, 'ocrEngineStatus', 
   get: function() 
) 
readonly ocrEngineStatus: OcrEngineStatus; 

Property Value

Status of the OCR engine on the server.

Remarks

The Document service can use LEADTOOLS OCR to extract text data from raster images using DocumentPage.GetText from document types that do not support SVG such as TIFF, PNG or JPEG. Text can be extracted from documents that support SVG directly such as PDF, DOCX, TEXT without the need of an OCR engine.

The service code reads the value of the lt.Ocr.EngineType setting from appsettings.json and if it is not empty, will try to create an instance of the LEADTOOLS OCR Engine specified using the value of the lt.Ocr.RuntimeDirectory setting as the engine runtime path.

When the value of lt.Ocr.EngineType is empty, then the server admin does not wish to use an OCR engine and the value of OcrEngineStatus will be NotSet. Subsequent calls to GetText on raster document pages will return an empty object.

When the value of lt.Ocr.EngineType is not empty, then the server admin will create the OCR engine specified and when successful and the value of OcrEngineStatus will be set to Ready. Subsequent calls GetText on raster document pages will return the text characters found.

If creation the OCR engine fails for any reason (most common are not setting the lt.Ocr.RuntimeDirectory setting to the engine runtime path or insufficient LEADTOOLS license being set) then the value of OcrEngineStatus will be set to Error. Subsequent calls GetText raster document pages will return an empty object.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly