OcrConnectorBase

Inheritance: java.lang.Object

public class OcrConnectorBase

Provides the OCR functionality.

Constructors

Constructor Description
OcrConnectorBase() Initializes a new instance of the OcrConnectorBase class.

Methods

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.

OcrConnectorBase()

public OcrConnectorBase()

Initializes a new instance of the OcrConnectorBase class.

isTextSupported()

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 .

isTextAreasSupported()

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 .

recognizeText(InputStream imageStream, OcrOptions options)

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.

recognizeTextAreas(InputStream imageStream, Size pageSize, OcrOptions options)

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.