ooodev.format.inner.modify.write.page.page.paper_format module

class ooodev.format.inner.modify.write.page.page.paper_format.PaperFormat(*, size=<ooodev.utils.data_type.size_mm.SizeMM object>, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]

Bases: PageStyleBaseMulti

Page Style Paper Format

New in version 0.9.0.

__init__(*, size=<ooodev.utils.data_type.size_mm.SizeMM object>, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]

Constructor

Parameters:
  • size (SizeMM, optional) – Width and height in mm units. Defaults to Letter size in Portrait mode.

  • style_name (WriterStylePageKind, 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_preset(preset, landscape=False, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]

Gets instance from preset

Parameters:
  • preset (PaperFormatKind) – Preset kind

  • landscape (bool, optional) – Specifies if the preset is in landscape mode. Defaults to False.

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

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

Returns:

Format from preset

Return type:

PaperFormat

classmethod from_style(doc, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]

Gets instance from Document.

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

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

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

Returns:

PaperFormat instance from document properties.

Return type:

PaperFormat

property prop_inner: PaperFormat

Gets/Sets Inner Paper Format instance

Return type:

PaperFormat

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str