ooodev.format.writer.modify.page.page package
Module contents
- class ooodev.format.writer.modify.page.page.LayoutSettings(*, layout=None, numbers=None, ref_style=None, right_gutter=None, gutter_pos_left=None, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]
Bases:
PageStyleBaseMulti
Page Layout Setting style
See also
New in version 0.9.0.
Changed in version 0.9.7: Added
gutter_pos_left
parameter.- __init__(*, layout=None, numbers=None, ref_style=None, right_gutter=None, gutter_pos_left=None, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]
Constructor
- Parameters:
layout (PageStyleLayout, optional) – Specifies the layout of the page.
numbers (NumberingTypeEnum, optional) – Specifies the default numbering type for this page.
ref_style (str, StyleParaKind, optional) – Specifies the name of the paragraph style that is used as reference of the register mode.
right_gutter (bool, optional) – Specifies that the page gutter shall be placed on the right side of the page.
gutter_pos_left (bool, optional) – Specifies if the gutters position is Left or Top of page. If
True
then gutter is left, ifFalse
gutter is top.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
See also
- 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:
LayoutSettings
instance from document properties.- Return type:
- property prop_gutter_pos_left: bool | None
Gets/Sets if the gutters position is Left or Top of page. If
True
then gutter is left, ifFalse
gutter is top.- Return type:
bool | None
- property prop_inner: LayoutSettings
Gets/Sets Inner Layout Settings instance
- Return type:
- property prop_layout: PageStyleLayout | None
Gets/Sets Page Style Layout value
- Return type:
PageStyleLayout | None
- property prop_numbers: NumberingTypeEnum | None
Gets/Sets Page Numbering value
- Return type:
NumberingTypeEnum | None
- property prop_ref_style: str | None
Gets/Sets the name of the paragraph style that is used as reference of the register mode.
- Return type:
str | None
- property prop_right_gutter: bool | None
Gets/Sets if the page gutter is placed on the right side of the page.
- Return type:
bool | None
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.page.page.Margins(*, left=None, right=None, top=None, bottom=None, gutter=None, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]
Bases:
PageStyleBaseMulti
Page Style Margins
See also
New in version 0.9.0.
- __init__(*, left=None, right=None, top=None, bottom=None, gutter=None, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]
Constructor
- Parameters:
left (float, optional) – Left Margin Value in
mm
units or Class UnitT.right (float, optional) – Right Margin Value in
mm
units or Class UnitT.top (float, optional) – Top Margin Value in
mm
units or Class UnitT.bottom (float, optional) – Bottom Margin Value in
mm
units or Class UnitT.gutter (float, optional) – Gutter Margin Value in
mm
units or Class UnitT.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
See also
- 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:
Margins
instance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str
- class ooodev.format.writer.modify.page.page.PaperFormat(*, size=<ooodev.utils.data_type.size_mm.SizeMM object>, style_name=WriterStylePageKind.STANDARD, style_family='PageStyles')[source]
Bases:
PageStyleBaseMulti
Page Style Paper Format
See also
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
See also
- 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:
- 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:
- property prop_inner: PaperFormat
Gets/Sets Inner Paper Format instance
- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str