__init__ constructor

init

Initializes a new instance of the PageAreaOptions class.

def __init__(self):
    ...

init

Initializes a new instance of the PageAreaOptions class.

def __init__(self, rectangle):
    ...
Parameter Type Description
rectangle Rectangle The rectangular area that contains page areas.

Example

from groupdocs.parser.options import PageAreaOptions
from groupdocs.parser.data import Rectangle, Point, Size

rect = Rectangle(Point(0, 0), Size(100, 200))
options = PageAreaOptions(rect)

init

Initializes a new instance of the PageAreaOptions class with the size of the ignored border.

def __init__(self, rectangle, rectangle_tolerance):
    ...
Parameter Type Description
rectangle Rectangle The rectangular area that contains page areas.
rectangle_tolerance float The size of the border that is ignored when captured by the rectangular area. It’s measured by the fraction of a text item height.

Example

from groupdocs.parser.options import PageAreaOptions
from groupdocs.parser.data import Rectangle, Point, Size

# Define the area of interest on the page
rect = Rectangle(Point(0, 0), Size(500, 300))

# Create options with a tolerance of 0.1 (10% of text height)
options = PageAreaOptions(rect, rectangle_tolerance=0.1)

See Also