public class TextOptions extends Object
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 and 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. |
| Modifier and Type | Method and Description |
|---|---|
OcrOptions |
getOcrOptions()
Gets the additional options for OCR functionality.
|
boolean |
isUseOcr()
Gets the value that indicates whether the OCR Connector is used to extract a text.
|
boolean |
isUseRawModeIfPossible()
Gets the value that indicates whether the raw mode is used.
|
public TextOptions(boolean useRawModeIfPossible)
TextOptions class.useRawModeIfPossible - The value that indicates whether the raw mode is used.public TextOptions(boolean useRawModeIfPossible,
boolean useOcr)
TextOptions class with the OCR usage option.useRawModeIfPossible - The value that indicates whether the raw mode is used.useOcr - The value that indicates whether the OCR functionality is used to extract a text.public TextOptions(boolean useRawModeIfPossible,
boolean useOcr,
OcrOptions ocrOptions)
TextOptions class with the ability to set OCR options.useRawModeIfPossible - The value that indicates whether the raw mode is used.useOcr - The value that indicates whether the OCR functionality is used to extract a text.ocrOptions - The additional options for OCR functionality.public boolean isUseRawModeIfPossible()
true if the raw mode is used; otherwise, false.public boolean isUseOcr()
true if the OCR functionality is used; otherwise, false.public OcrOptions getOcrOptions()
OcrOptions class with the additional OCR options.Copyright © 2026. All rights reserved.