Paper Office
paper-docxAPI referenceenum.section

WD_SECTION_START

paper-docx 0.2.0 API reference

Alias: WD_SECTION

Specifies the start type of a section break.

Example::

from docx.enum.section import WD_SECTION

section = document.sections[0] section.start_type = WD_SECTION.NEW_PAGE

MS API name: WdSectionStart MS API URL: http://msdn.microsoft.com/en-us/library/office/ff840975.aspx

Attributes

CONTINUOUS

attributeCONTINUOUS
= (0, 'continuous', 'Continuous section break.')

Continuous section break.

EVEN_PAGE

attributeEVEN_PAGE
= (3, 'evenPage', 'Even pages section break.')

Even pages section break.

NEW_COLUMN

attributeNEW_COLUMN
= (1, 'nextColumn', 'New column section break.')

New column section break.

NEW_PAGE

attributeNEW_PAGE
= (2, 'nextPage', 'New page section break.')

New page section break.

ODD_PAGE

attributeODD_PAGE
= (4, 'oddPage', 'Section begins on next odd page.')

Section begins on next odd page.

xml_value

attributexml_valuestr | None

Functions

from_xml

funcfrom_xml(xml_value: str | None) -> Self

Enumeration member corresponding to XML attribute value xml_value.

Example::

WD_PARAGRAPH_ALIGNMENT.from_xml("center") WD_PARAGRAPH_ALIGNMENT.CENTER

paramxml_valuestr | None

Returns

typing_extensions.Self

to_xml

functo_xml(value: int | _T | None) -> str | None

XML value of this enum member, generally an XML attribute value.

paramvalueint | _T | None

Returns

str | None

On this page