__init__ constructor

On this page

init

Initializes a recognized text fragment.

def __init__(self, text, rectangle):
    ...
Parameter Type Description
text str textual content of the recognized text fragment.
rectangle Rectangle bounding rectangle 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))

See Also

On this page