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

class ooodev.format.inner.modify.calc.page.sheet.scale_num_of_pages.ScaleNumOfPages(*, pages=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Shrink Page Range.

New in version 0.9.0.

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

Constructor

Parameters:
  • pages (int) – Specifies the number of pages the spreadsheet will scale to when printed.

  • 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:

ScaleNumOfPages instance from document properties.

Return type:

ScaleNumOfPages

property prop_pages: int

Gets/Sets the number of pages the spreadsheet will scale to when printed.

Return type:

int