Paper Office
paper-docxAPI referenceoxml.text.parfmt

CT_PPr

paper-docx 0.2.0 API reference

<w:pPr> element, containing the properties for a paragraph.

Attributes

first_line_indent

attributefirst_line_indentLength | None

A Length value calculated from the values of w:ind/@w:firstLine and w:ind/@w:hanging.

Returns None if the w:ind child is not present.

get_or_add_ind

attributeget_or_add_indCallable[[], CT_Ind]

get_or_add_pStyle

attributeget_or_add_pStyleCallable[[], CT_String]

get_or_add_sectPr

attributeget_or_add_sectPrCallable[[], CT_SectPr]

ind

attributeindCT_Ind | None
= ZeroOrOne('w:ind', successors=(_tag_seq[23:]))

ind_left

attributeind_leftLength | None

The value of w:ind/@w:left or None if not present.

ind_right

attributeind_rightLength | None

The value of w:ind/@w:right or None if not present.

jc

attributejc
= ZeroOrOne('w:jc', successors=(_tag_seq[27:]))

jc_val

attributejc_valWD_ALIGN_PARAGRAPH | None

Value of the <w:jc> child element or None if not present.

keepLines

attributekeepLines
= ZeroOrOne('w:keepLines', successors=(_tag_seq[3:]))

keepLines_val

attributekeepLines_val

The value of keepLines/@val or None if not present.

keepNext

attributekeepNext
= ZeroOrOne('w:keepNext', successors=(_tag_seq[2:]))

keepNext_val

attributekeepNext_val

The value of keepNext/@val or None if not present.

numPr

attributenumPr
= ZeroOrOne('w:numPr', successors=(_tag_seq[7:]))

outlineLvl

attributeoutlineLvlCT_DecimalNumber
= ZeroOrOne('w:outlineLvl', successors=(_tag_seq[31:]))

pStyle

attributepStyleCT_String | None
= ZeroOrOne('w:pStyle', successors=(_tag_seq[1:]))

pageBreakBefore

attributepageBreakBefore
= ZeroOrOne('w:pageBreakBefore', successors=(_tag_seq[4:]))

pageBreakBefore_val

attributepageBreakBefore_val

The value of pageBreakBefore/@val or None if not present.

sectPr

attributesectPr
= ZeroOrOne('w:sectPr', successors=(_tag_seq[35:]))

spacing

attributespacing
= ZeroOrOne('w:spacing', successors=(_tag_seq[22:]))

spacing_after

attributespacing_after

The value of w:spacing/@w:after or None if not present.

spacing_before

attributespacing_before

The value of w:spacing/@w:before or None if not present.

spacing_line

attributespacing_line

The value of w:spacing/@w:line or None if not present.

spacing_lineRule

attributespacing_lineRule

The value of w:spacing/@w:lineRule as a member of the :ref:WdLineSpacing enumeration.

Only the MULTIPLE, EXACTLY, and AT_LEAST members are used. It is the responsibility of the client to calculate the use of SINGLE, DOUBLE, and MULTIPLE based on the value of w:spacing/@w:line if that behavior is desired.

style

attributestylestr | None

String contained in ./w:pStyle/@val, or None if child is not present.

tabs

attributetabs
= ZeroOrOne('w:tabs', successors=(_tag_seq[11:]))

widowControl

attributewidowControl
= ZeroOrOne('w:widowControl', successors=(_tag_seq[6:]))

widowControl_val

attributewidowControl_val

The value of widowControl/@val or None if not present.

xml

attributexmlstr

XML string for this element, suitable for testing purposes.

Pretty printed for readability and without an XML declaration at the top.

Functions

first_child_found_in

funcfirst_child_found_in(*tagnames: str) -> _Element | None

First child with tag in tagnames, or None if not found.

paramtagnamesstr
= ()

Returns

lxml.etree._Element | None

insert_element_before

funcinsert_element_before(elm: ElementBase, *tagnames: str)
paramelmElementBase
paramtagnamesstr
= ()

remove_all

funcremove_all(*tagnames: str) -> None

Remove child elements with tagname (e.g. "a:p") in tagnames.

paramtagnamesstr
= ()

Returns

None

xpath

funcxpath(xpath_str: str) -> Any

Override of lxml _Element.xpath() method.

Provides standard Open XML namespace mapping (nsmap) in centralized location.

paramxpath_strstr

Returns

typing.Any

On this page