The RectangleObject Class

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

Bases: PyPDF2.generic._data_structures.ArrayObject

This class is used to represent page boxes in PyPDF2. These boxes include:
property bottom: PyPDF2.generic._base.FloatObject
ensureIsNumber(value: Any) Union[PyPDF2.generic._base.FloatObject, PyPDF2.generic._base.NumberObject][source]
getHeight() decimal.Decimal[source]
getLowerLeft() Tuple[decimal.Decimal, decimal.Decimal][source]
getLowerLeft_x() PyPDF2.generic._base.FloatObject[source]
getLowerLeft_y() PyPDF2.generic._base.FloatObject[source]
getLowerRight() Tuple[decimal.Decimal, decimal.Decimal][source]
getLowerRight_x() PyPDF2.generic._base.FloatObject[source]
getLowerRight_y() PyPDF2.generic._base.FloatObject[source]
getUpperLeft() Tuple[decimal.Decimal, decimal.Decimal][source]
getUpperLeft_x() PyPDF2.generic._base.FloatObject[source]
getUpperLeft_y() PyPDF2.generic._base.FloatObject[source]
getUpperRight() Tuple[decimal.Decimal, decimal.Decimal][source]
getUpperRight_x() PyPDF2.generic._base.FloatObject[source]
getUpperRight_y() PyPDF2.generic._base.FloatObject[source]
getWidth() decimal.Decimal[source]
property height: decimal.Decimal
property left: PyPDF2.generic._base.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._base.FloatObject
scale(sx: float, sy: float) PyPDF2.generic._rectangle.RectangleObject[source]
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._base.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