OcrConnectorBase
Leave feedback
On this page
Inheritance: java.lang.Object
public class OcrConnectorBase
Provides the OCR functionality.
| Constructor | Description |
|---|---|
| OcrConnectorBase() | Initializes a new instance of the OcrConnectorBase class. |
| Method | Description |
|---|---|
| isTextSupported() | Gets the value that indicates whether the text extraction is supported. |
| isTextAreasSupported() | Gets the value that indicates whether the text areas extraction is supported. |
| recognizeText(InputStream imageStream, OcrOptions options) | Recognize a text from imageStream stream. |
| recognizeTextAreas(InputStream imageStream, Size pageSize, OcrOptions options) | Recognize text areas from imageStream stream. |
public OcrConnectorBase()
Initializes a new instance of the OcrConnectorBase class.
public boolean isTextSupported()
Gets the value that indicates whether the text extraction is supported.
Returns: boolean - true if the text extraction is supported; otherwise, false .
public boolean isTextAreasSupported()
Gets the value that indicates whether the text areas extraction is supported.
Returns: boolean - true if the text extraction areas is supported; otherwise, false .
public String recognizeText(InputStream imageStream, OcrOptions options)
Recognize a text from imageStream stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| imageStream | java.io.InputStream | The image representation of the document page. |
| options | OcrOptions | The OCR options. |
Returns: java.lang.String - A string that represents a recognized text; null if text recognizing isn’t supported.
public Iterable<PageTextArea> recognizeTextAreas(InputStream imageStream, Size pageSize, OcrOptions options)
Recognize text areas from imageStream stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| imageStream | java.io.InputStream | The image representation of the document page. |
| pageSize | Size | The size of the document page. |
| options | OcrOptions | The OCR options. |
Returns: java.lang.Iterable<com.groupdocs.parser.data.PageTextArea> - A collection of PageTextArea objects; null if text areas recognizing isn’t supported.
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.