DocumentTextImagesRecognitionMode Enumeration

Summary

Indicates how to treat the image elements encountered in the input SVG page during text extraction.

Syntax
TypeScript
JavaScript
lt.Document.DocumentTextImagesRecognitionMode = { 
   auto: 0, 
   disabled: 1, 
   always: 2 
} 
lt.Document.DocumentTextImagesRecognitionMode = { 
   auto: 0, 
   disabled: 1, 
   always: 2 
} 
Members
ValueMemberDescription
auto0Use SVG engine unless the page is fully rastered.
disabled1Do not use OCR recognition for the image elements. Instead, the image elements are ignored.
always2Use OCR recognition on the image elements. The recognition data is added to the final document page text with the rest of the other SVG elements of the page. Requires a valid IOcrEngine instance.
Remarks

DocumentTextImagesRecognitionMode is used as the type of DocumentText.imagesRecognitionMode property to determine how image elements are treated during text extraction from an SVG page. This value has no effect on raster pages and OCR is always used.

The following table helps determine what would occur during DocumentPage.getText depending on the type of the page:

Value Page Type Behavior
Auto SVG with only text or mixed image and text elements. Only the text elements are extracted.
Auto SVG with raster elements only. The image elements are recognized and text extracted using the OCR engine.
Disabled SVG with only text or mixed image and text elements. Only the text elements are extracted.
Disabled SVG with raster elements only. No text is extracted.
Always SVG with only text or mixed image and text elements. The text elements are extracted and The image elements are recognized and text extracted using the OCR engine.
Always SVG with raster elements only. The image elements are recognized and text extracted using the OCR engine.

The engine uses DocumentPage.isSvgSupported and checks the SVG page elements (returned by DocumentPage.getSvg) to perform the actions described above.

When always is used, a valid (started) IOcrEngine instance must set in service.

When auto is used, a valid (started) IOcrEngine instance should be set in service; otherwise, the framework behaves as if disabled was used.

Requirements

Target Platforms

See Also

Reference

lt.Document Namespace

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

Leadtools.Document Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.