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 | NoneA 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 | NoneThe value of w:ind/@w:left or None if not present.
ind_right
attributeind_rightLength | NoneThe 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 | NoneValue of the <w:jc> child element or None if not present.
keepLines
attributekeepLines= ZeroOrOne('w:keepLines', successors=(_tag_seq[3:]))keepLines_val
attributekeepLines_valThe value of keepLines/@val or None if not present.
keepNext
attributekeepNext= ZeroOrOne('w:keepNext', successors=(_tag_seq[2:]))keepNext_val
attributekeepNext_valThe 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_valThe 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_afterThe value of w:spacing/@w:after or None if not present.
spacing_before
attributespacing_beforeThe value of w:spacing/@w:before or None if not present.
spacing_line
attributespacing_lineThe value of w:spacing/@w:line or None if not present.
spacing_lineRule
attributespacing_lineRuleThe 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 | NoneString 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_valThe value of widowControl/@val or None if not present.
xml
attributexmlstrXML 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 | NoneFirst child with tag in tagnames, or None if not found.
paramtagnamesstr= ()Returns
lxml.etree._Element | Noneinsert_element_before
funcinsert_element_before(elm: ElementBase, *tagnames: str)paramelmElementBaseparamtagnamesstr= ()remove_all
funcremove_all(*tagnames: str) -> NoneRemove child elements with tagname (e.g. "a:p") in tagnames.
paramtagnamesstr= ()Returns
Nonexpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any