TextOptions
Leave feedback
On this page
Inheritance: java.lang.Object
public class TextOptions
Provides the options which are used for text extraction.
An instance of TextOptions class is used as parameter in Parser.getText(TextOptions) and Parser.getText(int, TextOptions) methods. See the usage examples there.
It’s used to specify the raw mode of text extraction. A text in this mode is extracted in a non-accurate way but faster than in the standard mode. If the raw mode doesn’t support the document format, then this parameter is ignored and the standard mode is used.
Learn more:
| Constructor | Description |
|---|---|
| TextOptions(boolean useRawModeIfPossible) | Initializes a new instance of the TextOptions class. |
| TextOptions(boolean useRawModeIfPossible, boolean useOcr) | Initializes a new instance of the TextOptions class with the OCR usage option. |
| TextOptions(boolean useRawModeIfPossible, boolean useOcr, OcrOptions ocrOptions) | Initializes a new instance of the TextOptions class with the ability to set OCR options. |
| Method | Description |
|---|---|
| isUseRawModeIfPossible() | Gets the value that indicates whether the raw mode is used. |
| isUseOcr() | Gets the value that indicates whether the OCR Connector is used to extract a text. |
| getOcrOptions() | Gets the additional options for OCR functionality. |
public TextOptions(boolean useRawModeIfPossible)
Initializes a new instance of the TextOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| useRawModeIfPossible | boolean | The value that indicates whether the raw mode is used. |
public TextOptions(boolean useRawModeIfPossible, boolean useOcr)
Initializes a new instance of the TextOptions class with the OCR usage option.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| useRawModeIfPossible | boolean | The value that indicates whether the raw mode is used. |
| useOcr | boolean | The value that indicates whether the OCR functionality is used to extract a text. |
public TextOptions(boolean useRawModeIfPossible, boolean useOcr, OcrOptions ocrOptions)
Initializes a new instance of the TextOptions class with the ability to set OCR options.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| useRawModeIfPossible | boolean | The value that indicates whether the raw mode is used. |
| useOcr | boolean | The value that indicates whether the OCR functionality is used to extract a text. |
| ocrOptions | OcrOptions | The additional options for OCR functionality. |
public boolean isUseRawModeIfPossible()
Gets the value that indicates whether the raw mode is used.
Returns: boolean - true if the raw mode is used; otherwise, false .
public boolean isUseOcr()
Gets the value that indicates whether the OCR Connector is used to extract a text.
Returns: boolean - true if the OCR functionality is used; otherwise, false .
public OcrOptions getOcrOptions()
Gets the additional options for OCR functionality.
Returns: OcrOptions - An instance of OcrOptions class with the additional OCR options.
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.