com.groupdocs.redaction.integration

Class TextFragment



  • public class TextFragment
    extends Object

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


    Learn more

    • Constructor Detail

      • TextFragment

        public TextFragment(String text,
                    Rectangle rectangle)

        Initializes a new instance of the recognised text fragment.

        Parameters:
        text - textual content of the recognised text fragment
        rectangle - bounding rectangle of the recognised text fragment
    • Method Detail

      • getText

        public final String getText()

        Gets a textual content of the recognised text fragment.

        Returns:
        A textual content of the recognised text fragment.
      • getRectangle

        public final Rectangle getRectangle()

        Gets a bounding rectangle of the recognised text fragment.

        Returns:
        A bounding rectangle of the recognised text fragment.
      • toString

        public String toString()

        Returns textual content of the recognised text fragment.

        Overrides:
        toString in class Object
        Returns:
        textual content of the recognised text fragment