TextFragment
Leave feedback
On this page
Inheritance: java.lang.Object
public class TextFragment
Represents a part of recognized text (word, symbol, etc), extracted by OCR engine.
Learn more
- More details about using OCR in GroupDocs.Redaction: OCR Usage Basics
| Constructor | Description |
|---|---|
| TextFragment(String text, Rectangle rectangle) | Initializes a new instance of the recognised text fragment. |
| Method | Description |
|---|---|
| getText() | Gets a textual content of the recognised text fragment. |
| getRectangle() | Gets a bounding rectangle of the recognised text fragment. |
| toString() | Returns textual content of the recognised text fragment. |
public TextFragment(String text, Rectangle rectangle)
Initializes a new instance of the recognised text fragment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| text | java.lang.String | textual content of the recognised text fragment |
| rectangle | java.awt.Rectangle | bounding rectangle of the recognised text fragment |
public final String getText()
Gets a textual content of the recognised text fragment.
Returns: java.lang.String - A textual content of the recognised text fragment.
public final Rectangle getRectangle()
Gets a bounding rectangle of the recognised text fragment.
Returns: java.awt.Rectangle - A bounding rectangle of the recognised text fragment.
public String toString()
Returns textual content of the recognised text fragment.
Returns: java.lang.String - textual content of the recognised text fragment
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.