The RectangleObject Class

class PyPDF2.generic.RectangleObject(arr: Tuple[float, float, float, float])[source]

Bases: PyPDF2.generic.ArrayObject

This class is used to represent page boxes in PyPDF2. These boxes include:
property bottom: PyPDF2.generic.FloatObject
ensureIsNumber(value: Any) Union[PyPDF2.generic.FloatObject, PyPDF2.generic.NumberObject][source]
getHeight() decimal.Decimal[source]
getLowerLeft() Tuple[decimal.Decimal, decimal.Decimal][source]
getLowerLeft_x() PyPDF2.generic.FloatObject[source]
getLowerLeft_y() PyPDF2.generic.FloatObject[source]
getLowerRight() Tuple[decimal.Decimal, decimal.Decimal][source]
getLowerRight_x() PyPDF2.generic.FloatObject[source]
getLowerRight_y() PyPDF2.generic.FloatObject[source]
getUpperLeft() Tuple[decimal.Decimal, decimal.Decimal][source]
getUpperLeft_x() PyPDF2.generic.FloatObject[source]
getUpperLeft_y() PyPDF2.generic.FloatObject[source]
getUpperRight() Tuple[decimal.Decimal, decimal.Decimal][source]
getUpperRight_x() PyPDF2.generic.FloatObject[source]
getUpperRight_y() PyPDF2.generic.FloatObject[source]
getWidth() decimal.Decimal[source]
property height: decimal.Decimal
property left: PyPDF2.generic.FloatObject
property lowerLeft: Tuple[decimal.Decimal, decimal.Decimal]
property lowerRight: Tuple[decimal.Decimal, decimal.Decimal]
property lower_left: Tuple[decimal.Decimal, decimal.Decimal]

Property to read and modify the lower left coordinate of this box in (x,y) form.

property lower_right: Tuple[decimal.Decimal, decimal.Decimal]

Property to read and modify the lower right coordinate of this box in (x,y) form.

property right: PyPDF2.generic.FloatObject
setLowerLeft(value: Tuple[float, float]) None[source]
setLowerRight(value: Tuple[float, float]) None[source]
setUpperLeft(value: Tuple[float, float]) None[source]
setUpperRight(value: Tuple[float, float]) None[source]
property top: PyPDF2.generic.FloatObject
property upperLeft: Tuple[decimal.Decimal, decimal.Decimal]
property upperRight: Tuple[decimal.Decimal, decimal.Decimal]
property upper_left: Tuple[decimal.Decimal, decimal.Decimal]

Property to read and modify the upper left coordinate of this box in (x,y) form.

property upper_right: Tuple[decimal.Decimal, decimal.Decimal]

Property to read and modify the upper right coordinate of this box in (x,y) form.

property width: decimal.Decimal