ooodev.format.inner.modify.calc.page.sheet.scale_pages_width_height module

class ooodev.format.inner.modify.calc.page.sheet.scale_pages_width_height.ScalePagesWidthHeight(*, width=1, height=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Shrink Print Range to pages.

New in version 0.9.0.

__init__(*, width=1, height=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • width (int) – Specifies number of pages width. Default is 1.

  • height (int) – Specifies number of pages height. Default is 1.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Page Style that instance applies to. Default is Default Page Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Order instance from document properties.

Return type:

Order

property prop_height: int

Gets/Sets number of pages height.

Return type:

int

property prop_width: int

Gets/Sets number of pages width.

Return type:

int