DocxParagraph
classin packageklyn.io.docx
public class DocxParagraph
DocxParagraph

Represents a structured paragraph within an OpenXML Word document (.docx).

Provides access to the extracted Unicode text, formatting style identifier, and structural classification (heading, list item, or regular body text).

Example
import klyn.io.docx

try doc = DocxDocument("manual.docx"):
    for p in doc.paragraphs:
        if p.isHeading:
            print("Heading " + String(p.headingLevel) + ": " + p.text)
Properties
Modifier and Type Member Description
public readonly property headingLevel
headingLevel as Int
The 1-based level of the heading (1 for Heading 1, 2 for Heading 2, etc.), or 0 if not a heading.
public readonly property isHeading
isHeading as Boolean
Indicates whether this paragraph is formatted as a heading.
public readonly property isListItem
isListItem as Boolean
Indicates whether this paragraph is a bullet or numbered list item.
public readonly property style
style as String
The OpenXML paragraph style name (e.g.
public readonly property text
text as String
The extracted Unicode text of the paragraph.
Constructors
Modifier and Type Member Description
public DocxParagraph
DocxParagraph(text as String, style as String, isHeading as Boolean, headingLevel as Int, isListItem as Boolean)
Initializes a new DocxParagraph.