PageTextAreaOptions class

PageTextAreaOptions class

Provides the options which are used for page text areas extraction.

An instance of PageTextAreaOptions is used as a parameter in Parser.get_text_areas and Parser.get_text_areas methods. See the usage examples there.

Learn more:

The PageTextAreaOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new PageTextAreaOptions instance with the OCR usage option.
init Initializes a new instance of the PageTextAreaOptions class with the OCR usage option.
init Initializes a new instance of the PageTextAreaOptions class with the ability to set OCR options.
init Initializes a new PageTextAreaOptions instance with the regular expression.
init Initializes a new PageTextAreaOptions instance with the regular expression and rectangular area, leaving other options at their default values.
init Initializes a new instance of the PageTextAreaOptions class with the regular expression, rectangular area and the size of the ignored border.
init Initializes a new PageTextAreaOptions instance.
init Initializes a new PageTextAreaOptions instance with the size of the ignored border.

Properties

Property Description
expression The regular expression used to filter text areas.
ignore_formatting The value indicating whether text formatting is ignored. True if text formatting is ignored; otherwise, False.
match_case The value indicating whether a text case isn’t ignored.
ocr_options The additional OCR options for extracting text areas.
unite_segments The value indicating whether segments are united.
use_ocr The flag indicating whether OCR functionality is used to extract text areas.
rectangle The rectangular area that contains page areas. (inherited from PageAreaOptions)
rectangle_tolerance The size of the border that is ignored when captured by the rectangular area, measured as a fraction of a text item height. (inherited from PageAreaOptions)

Example

from groupdocs.parser import Parser
from groupdocs.parser.options import PageTextAreaOptions

options = PageTextAreaOptions()
text_areas = Parser("sample.docx").get_text_areas(options)

See Also