Paper Office
paper-docxAPI referenceenum.text

WD_LINE_SPACING

paper-docx 0.2.0 API reference

Specifies a line spacing format to be applied to a paragraph.

Example::

from docx.enum.text import WD_LINE_SPACING

paragraph = document.add_paragraph() paragraph.line_spacing_rule = WD_LINE_SPACING.EXACTLY

MS API name: WdLineSpacing

URL: http://msdn.microsoft.com/en-us/library/office/ff844910.aspx

Attributes

AT_LEAST

attributeAT_LEAST
= (3, 'atLeast', 'Minimum line spacing is specified amount. Amount is specified separately.')

Minimum line spacing is specified amount. Amount is specified separately.

DOUBLE

attributeDOUBLE
= (2, 'UNMAPPED', 'Double spaced.')

Double spaced.

EXACTLY

attributeEXACTLY
= (4, 'exact', 'Line spacing is exactly specified amount. Amount is specified separately.')

Line spacing is exactly specified amount. Amount is specified separately.

MULTIPLE

attributeMULTIPLE
= (5, 'auto', 'Line spacing is specified as multiple of line heights. Changing font size will change line spacing proportionately.')

Line spacing is specified as multiple of line heights. Changing font size will change the line spacing proportionately.

ONE_POINT_FIVE

attributeONE_POINT_FIVE
= (1, 'UNMAPPED', 'Space-and-a-half line spacing.')

Space-and-a-half line spacing.

SINGLE

attributeSINGLE
= (0, 'UNMAPPED', 'Single spaced (default).')

Single spaced (default).

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