public class 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).
import klyn.io.docx
try doc = DocxDocument("manual.docx"):
for p in doc.paragraphs:
if p.isHeading:
print("Heading " + String(p.headingLevel) + ": " + p.text)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | headingLevelheadingLevel 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 | isHeadingisHeading as Boolean |
Indicates whether this paragraph is formatted as a heading. |
| public readonly property | isListItemisListItem as Boolean |
Indicates whether this paragraph is a bullet or numbered list item. |
| public readonly property | stylestyle as String |
The OpenXML paragraph style name (e.g. |
| public readonly property | texttext as String |
The extracted Unicode text of the paragraph. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | DocxParagraph | Initializes a new DocxParagraph. |