TextFragment class

TextFragment class

Represents a part of recognized text (word, symbol, etc), extracted by an OCR engine.

Learn more:

The TextFragment type exposes the following members:

Constructors

Constructor Description
init Initializes a recognized text fragment.

Methods

Method Description
to_string Returns textual content of the recognized text fragment.

Properties

Property Description
bounding_rectangle The bounding rectangle of the recognized text fragment; this property is obsolete, use TextFragment.rectangle instead.
rectangle The bounding rectangle of the recognized text fragment.
text The textual content of the recognized text fragment.

Example

from groupdocs.redaction.integration.ocr import TextFragment
from groupdocs.redaction.options.drawing import Rectangle

fragment = TextFragment("Emily Johnson", Rectangle(40, 40, 230, 40))

Guides

Task guides that use TextFragment:

See Also