Poppler.Rectangle

Fields

Name

Type

Access

Description

x1

float

r/w

x coordinate of lower left corner

x2

float

r/w

x coordinate of upper right corner

y1

float

r/w

y coordinate of lower left corner

y2

float

r/w

y coordinate of upper right corner

Methods

class

new ()

copy ()

find_get_ignored_hyphen ()

find_get_match_continued ()

free ()

Details

class Poppler.Rectangle

A Poppler.Rectangle is used to describe locations on a page and bounding boxes

classmethod new()
Returns:

a new Poppler.Rectangle, use Poppler.Rectangle.free() to free it

Return type:

Poppler.Rectangle

Creates a new Poppler.Rectangle

copy()
Returns:

a new allocated copy of self

Return type:

Poppler.Rectangle

Creates a copy of self.

Note that you must only use this function on an allocated Poppler.Rectangle, as returned by Poppler.Rectangle.new(), Poppler.Rectangle.copy(), or the list elements returned from Poppler.Page.find_text() or Poppler.Page.find_text_with_options().

find_get_ignored_hyphen()
Returns:

whether a hyphen was ignored at the end of the line corresponding to self.

Return type:

bool

When using Poppler.Page.find_text_with_options() with the Poppler.FindFlags.MULTILINE flag, a match may span more than one line, and may have been formed by ignoring a hyphen at the end of the line. When this happens at the end of the line corresponding to self, this function returns True (and then Poppler.Rectangle.find_get_match_continued() will also return True); otherwise it returns False.

Note that you must only call this function on a Poppler.Rectangle returned in the list from Poppler.Page.find_text() or Poppler.Page.find_text_with_options().

New in version 21.05.0.

find_get_match_continued()
Returns:

whether there are more rectangles belonging to the same match

Return type:

bool

When using Poppler.Page.find_text_with_options() with the Poppler.FindFlags.MULTILINE flag, a match may span more than one line and thus consist of more than one rectangle. Every rectangle belonging to the same match will return True from this function, except for the last rectangle, where this function will return False.

Note that you must only call this function on a Poppler.Rectangle returned in the list from Poppler.Page.find_text() or Poppler.Page.find_text_with_options().

New in version 21.05.0.

free()

Frees the given Poppler.Rectangle.

Note that you must only use this function on an allocated Poppler.Rectangle, as returned by Poppler.Rectangle.new(), Poppler.Rectangle.copy(), or the list elements returned from Poppler.Page.find_text() or Poppler.Page.find_text_with_options().