Aspose.Words FOSS for Python API Reference

API reference for Aspose.Words FOSS for Python v26.7.0. 189 public types organized by module.

Core API

ClassDescription
BodyThe Body class aggregates paragraphs and tables and lets you retrieve child nodes of a specific type with get_child_nodes(node_type, deep).
BorderBorder.line_style is an integer representing the border’s line style.
CellCell objects expose a cell_format property that provides width, padding, vertical alignment, and shading options via the CellFormat class.
CellFormatCellFormat.width specifies the absolute width of the table cell in points.
ConditionalStyleMaskParsed ```` 12-bit bitmask for banded-table regions.
DocListDocList.list_id is the identifier of the list within the document.
DocumentThe Document class represents a Word document and provides the get_text() method to extract the full plain‑text content of the file.
DocumentFormatReaderProtocol defining the interface all document readers must implement.
FieldEndFieldEnd is a class in Aspose.Words FOSS for Python exposing the field_type, has_separator, type properties.
FieldSeparatorFieldSeparator is a class in Aspose.Words FOSS for Python exposing the field_type, type properties.
FieldStartFieldStart.type is a string indicating the field’s type name.
FontFont.name stores the font family name as a string.
FrameFormatFloating text-frame definition.
HeaderFooterHeaderFooter.type is a string representing the header/footer content type.
ImageDataImageData.from_mime(‘image/png’) returns the integer constant representing the PNG image type.
ListFormatListFormat exposes whether a paragraph is part of a list and provides the list level and identifier through is_list_item, list_level_number, and list_id.
ListLabelSnapshot of a list-item’s rendered bullet/number label.
ListLevelListLevel.number_format specifies the numeric format string for the list level.
ListLevelOverrideOne inside a concrete.
LoadOptionsOptions for loading a document.
NodeCastMixinas_*() casts mirroring aspose.words.Node; identity here.
NodeTypeNode type discriminators, valued as in aspose.words.
OoxmlSaveOptionsOptions for saving a document as DOCX (Office Open XML).
PageSetupPageSetup exposes page layout properties like paper size, margins, and orientation, allowing developers to programmatically configure document pagination.
ParagraphA paragraph whose children — Run, BookmarkStart / End, FieldStart / Separator / End and inline Shape — sit in a single ordered collection in document order.
ParagraphFormatParagraphFormat.alignment specifies the horizontal alignment of the paragraph.
ParagraphInfoInformation about a paragraph’s style and context.
PdfSaveOptionsOptions for saving documents as PDF.
PreferredWidthPreferred width of a table / cell.
RowRow.as_cell() returns the Row instance cast as a Cell when the underlying node is a table cell, enabling cell‑specific operations.
RowFormatRowFormat properties let developers control table row height, height rule, heading format, page‑break behavior, conditional style, and borders.
RtfFileReaderReads RTF files (OLE2-format) and produces the same data structures as DocumentReader (for .docx) and DocFileReader (for .doc).
RunRun.text holds the literal text content of the run.
RunFormattingText run formatting properties.
SectionSection objects provide as_body(), as_paragraph(), as_table(), etc., to cast a generic section node to a specific element type.
ShadingShading is a class in Aspose.Words FOSS for Python exposing the background_pattern_color, foreground_pattern_color properties.
ShapeShape objects expose geometry and content properties such as width, height, image_data and text_box, and can be cast to other node types via as_body(), as_paragraph(), etc.
StyleStyle.name is the identifier string of the style.
TabStopTabStop is a class in Aspose.Words FOSS for Python exposing the alignment, is_clear, leader, position properties.
TabStopCollectionTabStopCollection.add(position, alignment, leader) creates a new TabStop with the specified position, alignment (e.g., TabAlignment.LEFT) and leader (e.g., TabLeader.DOT).
TableTable conversion to Markdown is handled by TableConverter, which respects table style properties and content alignment.
TableCellRepresents a table cell.
TableRowRepresents a table row.
TableStyleFormatTable-level properties stored on table styles (w:tblPr inside w:style).
TableStylePropertyConditional formatting for a table region (w:tblStylePr).
TextColumnTextColumn is a class in Aspose.Words FOSS for Python exposing the space_after, width properties.
TextColumnsTextColumns exposes properties count, evenly_spaced, spacing, line_between, and columns to configure multi‑column layout in a document.
TextFileReaderReads plain-text (.txt) files and yields one Paragraph per line.
UnknownNodeUnknownNode is a class in Aspose.Words FOSS for Python exposing the type property.

Enumerations

EnumerationDescription
CodeBlockStyleCode block style preference.
ColorModeColor rendering mode.
CompressionLevelCompression level for OOXML files.
HeadingStyleHeading export style preference.
LoadFormatDocument load format constants, valued as in aspose.words.
PdfFontEmbeddingModeFont embedding mode in PDF.
PdfImageCompressionImage compression in PDF.
PdfPageModePDF page display mode.
PdfTextCompressionText compression in PDF.
PdfZoomBehaviorMirrors public API.
SaveFormatDocument save format constants, valued as in aspose.words.
TableContentAlignmentTable content alignment options.
Zip64ModeControls when to use ZIP64 format extensions for OOXML files.

Compliance

EnumerationDescription
OoxmlComplianceOOXML standards compliance level.
PdfCompliancePDF standards compliance level.

Conversion

ClassDescription
ConversionOptionsOptions for controlling DOCX to Markdown conversion.
LdmMarkdownWriterConverts a light_document_model.Document to a Markdown string.
MarkdownFileReaderReads Markdown (.md) files and yields one Paragraph per line.
MarkdownLoadOptionsLoad options specific to Markdown (.md) input.
MarkdownReaderReads Markdown (.md) files, producing the same data structures as DocumentReader (for .docx) and DocFileReader (for .doc).
MarkdownSaveOptionsOptions for saving documents as Markdown.

Enumerations

EnumerationDescription
MarkdownEmptyParagraphExportModeControls how empty paragraphs are exported.
MarkdownExportAsHtmlControls which elements are exported as raw HTML.
MarkdownLinkExportModeLink export mode options.
MarkdownListExportModeList export mode options.

Converters

ClassDescription
ListHandlerHandles parsing and conversion of lists.
ParagraphConverterHandles conversion of paragraphs to Markdown.
TableConverterHandles conversion of tables to Markdown.

Doc Reader

ClassDescription
BlipInfoParsed BSE (Blip Store Entry) with location of image data.
CharPropsProperties extracted from CHPX for a text run.
ChildAnchorInfoPosition of a child shape within its parent group’s coordinate system.
DocFileReaderFull DOC reader with LDM (Light Document Model) building capability.
DocFileReaderCoreCore reader for Word 97-2003 (.doc) files.
DocTableBuilderMixinMixin that adds table-building helpers to the DOC reader.
FibDataParsed FIB (File Information Block) data.
GroupShapeInfoCoordinate system of a shape group (from Spgr record).
ListDefParsed list definition with full level information.
ListLevelDataOne parsed LVL record (measurements in points).
ParaPropsProperties extracted from PAPX for a single paragraph.
ShapeAnchorParsed SPA (Shape Address) from PlcSpaMom / PlcSpaHdr.
ShapeCropInfoEscher crop properties for a shape (from FOpt records).
ShapeLinePropsEscher line/fill properties for a shape (from FOpt records).
StyleDataProperties parsed from a style definition (STSH UPX).
TableRowPropsProperties extracted from PAPX SPRMs on table row-end paragraphs.

Docx Reader

ClassDescription
CellBuilderBuild :class:ldm.Cell from a ```` element.
CellDataTable cell.
DocumentReaderReads DOCX documents and produces abstracted data structures.
FontBuilderBuild a non-cascaded :class:ldm.Font from one ````.
FontResolverCompose a fully cascaded :class:ldm.Font.
LdmBuilderMixinMixin that adds :meth:to_light_document to :class:DocumentReader.
ListBuilderTranslate ```` into a list of :class:ldm.DocList.
NumberingInfoNumbering definition.
NumberingLevelList level definition.
PageSetupBuilderBuild :class:ldm.PageSetup from a ```` element.
ParagraphBuilderBuild :class:ldm.Paragraph from a ```` element.
ParagraphDataParagraph with style and content.
ParagraphFormatBuilderBuild a non-cascaded :class:ldm.ParagraphFormat from one ````.
ParagraphFormatResolverCompose a fully cascaded :class:ldm.ParagraphFormat.
ReaderContextReaderContext is a class in Aspose.Words FOSS for Python that extends Protocol.
RowBuilderBuild :class:ldm.Row from a ```` element.
RowDataTable row.
RunBuilderBuild a single :class:ldm.Run with a resolved font cascade.
RunDataText run with formatting.
SectionBuilderSplit the body into :class:ldm.Section\ s at sectPr boundaries.
ShapeParserMixinMixin providing drawing/shape parsing methods for DocumentReader.
StyleBuilderTranslate ```` into a list of :class:ldm.Style.
StyleChainResolverWalk the ```` graph for a styleId.
TableBuilderBuild :class:ldm.Table from a ```` element.
TableDataTable structure.

Docx Writer

ClassDescription
BookmarkStateHands out monotonically increasing bookmark ids and pairs starts/ends across paragraphs.
DocxWriterLossyWarningWarns the caller that the writer is dropping known LDM constructs.
ImageEntryOne image to add to word/media/ plus its relationship row.
ImageRenderStateAccumulator threaded through paragraph rendering for inline shapes.
LdmDocxWriterConvert an :class:ldm.Document into a DOCX file.

Md Import

ClassDescription
AtxHeadingBlockAtxHeadingBlock represents an ATX style heading and provides a level property and add_child(child) / get_parent() methods for tree manipulation.
AutolinkBlockAutolinkBlock stores hyperlink display text in the text property and its target URI in the uri property.
BlockBase class for every node in the Markdown block tree.
BoldInlineBlockBoldInlineBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
BulletListItemBlockBulletListItemBlock exposes the list marker via the marker property, the starting number via start_at, and its nesting depth via the get_level() method.
CellBlockCellBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
DocumentBlockDocumentBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
FencedCodeBlockFencedCodeBlock represents a fenced code block in Markdown with properties such as code, info, and fence_char, and supports the standard block navigation API.
FootnoteDefinitionBlockFootnoteDefinitionBlock.add_child(child) links a new child Block into the footnote hierarchy and returns the added Block.
FootnoteReferenceBlockFootnoteReferenceBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
HeadingBlockHeadingBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
HorizontalRuleBlockHorizontalRuleBlock objects can be linked into a document tree by calling add_child(child) and navigating with get_parent(), next_sibling, and previous_sibling properties.
HtmlInsertOptionsFlags for :meth:MarkdownDocumentBuilder.insert_html (mirrors Aspose.Words’ HtmlInsertOptions).
HtmlTagBlockA raw HTML tag, block-level or inline (Markdig’s HtmlBlock / HtmlInline, folded into one node here).
IndentedCodeBlockIndentedCodeBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
InlineCodeBlockInlineCodeBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
ItalicInlineBlockItalicInlineBlock provides navigation properties such as next_sibling, previous_sibling, and parent, enabling it to be placed within an inline hierarchy.
LineBreakBlockLineBreakBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
LinkTextBlockLinkTextBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
ListBlockContainer grouping sibling ListItemBlocks (Markdig’s ListBlock).
ListItemBlockListItemBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_level, get_list_container, get_parent.
MarkdownDocumentBuilderLDM cursor/writer used by :class:MarkdownReaderContext.
MarkdownReaderContextDrives Markdown block-tree events into a fresh LDM Document.
OrderedListItemBlockOrderedListItemBlock.get_level() returns the integer depth of the list item within its parent list.
ParagraphBlockParagraphBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
QuoteBlockQuoteBlock objects represent block‑quote structures; you can add nested children with add_child() and navigate siblings via next_sibling and previous_sibling.
RowBlockRowBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
SetextHeadingBlockSetextHeadingBlock and StrikethroughBlock both implement a generic block interface with child‑management methods add_child() and get_parent().
StrikethroughBlockStrikethroughBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
TableBlockTableBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.
TextBlockA literal run of text (Markdig’s LiteralInline).
UnderlineBlockUnderlineBlock is a class in Aspose.Words FOSS for Python exposing __init__, __repr__, add_child, get_parent.

Enumerations

EnumerationDescription
BlockTypeBlockType is an enumeration in Aspose.Words FOSS for Python defining DOCUMENT, PARAGRAPH, ATX_HEADING, SETEXT_HEADING, QUOTE, INDENTED_CODE, and 20 more.
ListMarkerBullet/ordered list marker, mirroring Aspose.Words’ ListMarker.
MarkdownBlockLevelWhere a block sits in the tree.

Model

ClassDescription
CellMergeSpecifies how a cell in a table is merged with other cells.
CellVerticalAlignmentSpecifies vertical justification of text inside a table cell.
HeightRuleSpecifies the rule for determining the height of an object.
ImageTypeSpecifies the type (format) of an image in a document.
LineSpacingRuleSpecifies values for line spacing.
LineStyleSpecifies line style of a border.
NumberStyleSpecifies the number style for a list, footnotes, endnotes, page numbers.
OrientationSpecifies page orientation.
ParagraphAlignmentSpecifies text alignment in a paragraph.
PreferredWidthTypeSpecifies the unit of measurement for the preferred width of a table or cell.
SectionStartSpecifies the type of break at the beginning of the section.
StyleIdentifierLocale-independent built-in style identifier.
StyleTypeSpecifies type of the style.
TabAlignmentTab stop alignment.
TabLeaderTab stop leader character.
UnderlineSpecifies type of the underline applied to a font.
WrapTypeSpecifies how text is wrapped around a shape or picture.

Parsers

ClassDescription
ListInfoInformation about a list.
ListLevelInfoInformation about a list level.
NumberingParserParser for DOCX numbering definitions.
ParsedStyleParsed style information.
StyleParserParser for DOCX style names and properties.

Pdf Writer

ClassDescription
LdmPdfWriterConverts a light_document_model.Document to a PDF file.
PDFWriterContextPDFWriterContext is a class in Aspose.Words FOSS for Python exposing the options property.
ParagraphRendererRenders LDM paragraphs into PDF.
RunRendererRenders formatted runs (text segments with fonts, colors, links).
ShapeRendererRenders shapes, images, and positioned elements.
TableRendererRenders LDM tables into PDF.

Structure

ClassDescription
BookmarkEndBookmarkEnd objects expose the type and name properties to identify the end of a bookmark in the document model.
BookmarkStartMarks the beginning of a Word bookmark (````).
OutlineOptionsControls how outlines (bookmarks panel) are generated in the PDF.

See Also

 English