The RectangleObject Class

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

Bases: ArrayObject

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

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

property lower_right: Tuple[Decimal, Decimal]

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

property right: FloatObject
scale(sx: float, sy: float) 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: FloatObject
property upperLeft: Tuple[Decimal, Decimal]
property upperRight: Tuple[Decimal, Decimal]
property upper_left: Tuple[Decimal, Decimal]

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

property upper_right: Tuple[Decimal, Decimal]

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

property width: Decimal