aspose.words module
The aspose.words module provides classes for generating, converting, modifying, rendering and printing Microsoft Word documents without utilizing Microsoft Word.
Aspose.Words library is written in Python and C#, and contains only safe managed code. Microsoft Word is not required in order to use Aspose.Words.
The classes in the aspose.words module borrow best practices from two well-known frameworks: Microsoft Word Automation and System.Xml. A document in Aspose.Words is represented by a tree of nodes, much like in XML DOM. Where possible, class, method and property names match those found in Microsoft Word Automation.
The main classes in this module are:
Document is the main class of the object model that represents a Microsoft Word document.
DocumentBuilder provides an easy way to insert content and formatting into a document.
Node is the base class for all nodes in the document.
CompositeNode is the base class for all nodes of the document that can contain other nodes, for example Paragraph, Section and Table.
Classes
Class | Description |
---|---|
AbsolutePositionTab | An absolute position tab is a character which is used to advance the position on the current line of text when displaying this WordprocessingML content. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
Body | Represents a container for the main text of a section. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
Bookmark | Represents a single bookmark. To learn more, visit the Working with Bookmarks documentation article. |
BookmarkCollection | A collection of Bookmark objects that represent the bookmarks in the specified range. To learn more, visit the Working with Bookmarks documentation article. |
BookmarkEnd | Represents an end of a bookmark in a Word document. To learn more, visit the Working with Bookmarks documentation article. |
BookmarkStart | Represents a start of a bookmark in a Word document. To learn more, visit the Working with Bookmarks documentation article. |
Border | Represents a border of an object. To learn more, visit the Programming with Documents documentation article. |
BorderCollection | A collection of Border objects. To learn more, visit the Programming with Documents documentation article. |
BuildVersionInfo | Provides information about the current product name and version. To learn more, visit the Generator or Producer Name Included in Output Documents documentation article. |
CleanupOptions | Allows to specify options for document cleaning. To learn more, visit the Clean Up a Document documentation article. |
ComHelper | Provides methods for COM clients to load a document into Aspose.Words. |
Comment | Represents a container for text of a comment. To learn more, visit the Working with Comments documentation article. |
CommentCollection | Provides typed access to a collection of Comment nodes. To learn more, visit the Working with Comments documentation article. |
CommentRangeEnd | Denotes the end of a region of text that has a comment associated with it. To learn more, visit the Working with Comments documentation article. |
CommentRangeStart | Denotes the start of a region of text that has a comment associated with it. To learn more, visit the Working with Comments documentation article. |
CompositeNode | Base class for nodes that can contain other nodes. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
ConditionalStyle | Represents special formatting applied to some area of a table with assigned table style. To learn more, visit the Working with Tables documentation article. |
ConditionalStyleCollection | Represents a collection of ConditionalStyle objects. To learn more, visit the Working with Tables documentation article. |
ControlChar | Control characters often encountered in documents. To learn more, visit the Working With Control Characters documentation article. |
ConvertUtil | Provides helper functions to convert between various measurement units. To learn more, visit the Convert Between Measurement Units documentation article. |
Document | Represents a Word document. To learn more, visit the Working with Document documentation article. |
DocumentBase | Provides the abstract base class for a main document and a glossary document of a Word document. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
DocumentBuilder | Provides methods to insert text, images and other content, specify font, paragraph and section formatting. To learn more, visit the Document Builder Overview documentation article. |
DocumentBuilderOptions | Allows to specify additional options for the document building process. |
DocumentReaderPluginLoadException | Thrown during document load, when the plugin required for reading the document format cannot be loaded. |
DocumentVisitor | Base class for custom document visitors. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
EditableRange | Represents a single editable range. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
EditableRangeEnd | Represents an end of an editable range in a Word document. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
EditableRangeStart | Represents a start of an editable range in a Word document. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
FileCorruptedException | Thrown during document load, when the document appears to be corrupted and impossible to load. To learn more, visit the Programming with Documents documentation article. |
FileFormatInfo | Contains data returned by FileFormatUtil document format detection methods. To learn more, visit the Detect File Format and Check Format Compatibility documentation article. |
FileFormatUtil | Provides utility methods for working with file formats, such as detecting file format or converting file extensions to/from file format enums. To learn more, visit the Detect File Format and Check Format Compatibility documentation article. |
Font | Contains font attributes (font name, font size, color, and so on) for an object. To learn more, visit the Working with Fonts documentation article. |
FrameFormat | Represents frame related formatting for a paragraph. |
HeaderFooter | Represents a container for the header or footer text of a section. To learn more, visit the Working with Headers and Footers documentation article. |
HeaderFooterCollection | Provides typed access to HeaderFooter nodes of a Section. To learn more, visit the Working with Headers and Footers documentation article. |
Hyphenation | Provides methods for working with hyphenation dictionaries. These dictionaries prescribe where words of a specific language can be hyphenated. To learn more, visit the Working with Hyphenation documentation article. |
IDocumentConverterPlugin | Defines an interface for external converter plugin. |
IDocumentMergerPlugin | Defines an interface for external merger plugin that can merge Pdf documents. |
IDocumentReaderPlugin | Defines an interface for external reader plugins that can read a file into a document. |
IHyphenationCallback | Implemented by classes which can register hyphenation dictionaries. |
INodeChangingCallback | Implement this interface if you want to receive notifications when nodes are inserted or removed in the document. |
IRevisionCriteria | Implement this interface if you want to control when certain Revision should be accepted/rejected or not by the RevisionCollection.accept()/RevisionCollection.reject() methods. |
IWarningCallback | Implement this interface if you want to have your own custom method called to capture loss of fidelity warnings that can occur during document loading or saving. |
ImageWatermarkOptions | Contains options that can be specified when adding a watermark with image. To learn more, visit the Working with Watermark documentation article. |
ImportFormatOptions | Allows to specify various import options to format output. To learn more, visit the Specify Load Options documentation article. |
IncorrectPasswordException | Thrown if a document is encrypted with a password and the password specified when opening the document is incorrect or missing. To learn more, visit the Programming with Documents documentation article. |
Inline | Base class for inline-level nodes that can have character formatting associated with them, but cannot have child nodes of their own. To learn more, visit the Logical Levels of Nodes in a Document documentation article. |
InlineStory | Base class for inline-level nodes that can contain paragraphs and tables. To learn more, visit the Logical Levels of Nodes in a Document documentation article. |
InternableComplexAttr | Base class for internable complex attribute. Internable complex attribute should notify parent collection when going to be changed. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
License | Provides methods to license the component. To learn more, visit the Licensing and Subscription documentation article. |
Metered | Provides methods to set metered key. |
Node | Base class for all nodes of a Word document. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
NodeChangingArgs | Provides data for methods of the INodeChangingCallback interface. |
NodeCollection | Represents a collection of nodes of a specific type. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
NodeImporter | Allows to efficiently perform repeated import of nodes from one document to another. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
NodeList | Represents a collection of nodes matching an XPath query executed using the CompositeNode.select_nodes() method. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
PageSetup | Represents the page setup properties of a section. To learn more, visit the Working with Sections documentation article. |
Paragraph | Represents a paragraph of text. To learn more, visit the Working with Paragraphs documentation article. |
ParagraphCollection | Provides typed access to a collection of Paragraph nodes. To learn more, visit the Working with Paragraphs documentation article. |
ParagraphFormat | Represents all the formatting for a paragraph. To learn more, visit the Working with Paragraphs documentation article. |
PhoneticGuide | Represents Phonetic Guide. |
PlainTextDocument | Allows to extract plain-text representation of the document’s content. To learn more, visit the Working with Text Document documentation article. |
Range | Represents a contiguous area in a document. To learn more, visit the Working with Ranges documentation article. |
Revision | Represents a revision (tracked change) in a document node or style. Use Revision.revision_type to check the type of this revision. To learn more, visit the Track Changes in a Document documentation article. |
RevisionCollection | A collection of Revision objects that represent revisions in the document. To learn more, visit the Track Changes in a Document documentation article. |
RevisionGroup | Represents a group of sequential Revision objects. To learn more, visit the Track Changes in a Document documentation article. |
RevisionGroupCollection | A collection of RevisionGroup objects that represent revision groups in the document. To learn more, visit the Track Changes in a Document documentation article. |
Run | Represents a run of characters with the same font formatting. To learn more, visit the Programming with Documents documentation article. |
RunCollection | Provides typed access to a collection of Run nodes. To learn more, visit the Programming with Documents documentation article. |
Section | Represents a single section in a document. To learn more, visit the Working with Sections documentation article. |
SectionCollection | A collection of Section objects in the document. To learn more, visit the Working with Sections documentation article. |
Shading | Contains shading attributes for an object. To learn more, visit the Programming with Documents documentation article. |
SignatureLineOptions | Allows to specify options for signature line being inserted. Used in DocumentBuilder. To learn more, visit the Work with Digital Signatures documentation article. |
SpecialChar | Base class for special characters in the document. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
Story | Base class for elements that contain block-level nodes Paragraph and Table. To learn more, visit the Logical Levels of Nodes in a Document documentation article. |
Style | Represents a single built-in or user-defined style. To learn more, visit the Working with Styles and Themes documentation article. |
StyleCollection | A collection of Style objects that represent both the built-in and user-defined styles in a document. To learn more, visit the Working with Styles and Themes documentation article. |
SubDocument | Represents a SubDocument - which is a reference to an externally stored document. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
TabStop | Represents a single custom tab stop. The TabStop object is a member of the TabStopCollection collection. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
TabStopCollection | A collection of TabStop objects that represent custom tabs for a paragraph or a style. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article. |
TableStyle | Represents a table style. To learn more, visit the Working with Tables documentation article. |
TextColumn | Represents a single text column. TextColumn is a member of the TextColumnCollection collection. The TextColumn collection includes all the columns in a section of a document. To learn more, visit the Working with Sections documentation article. |
TextColumnCollection | A collection of TextColumn objects that represent all the columns of text in a section of a document. To learn more, visit the Working with Sections documentation article. |
TextWatermarkOptions | Contains options that can be specified when adding a watermark with text. To learn more, visit the Working with Watermark documentation article. |
UnsupportedFileFormatException | Thrown during document load, when the document format is not recognized or not supported by Aspose.Words. To learn more, visit the Programming with Documents documentation article. |
VariableCollection | A collection of document variables. To learn more, visit the Work with Document Properties documentation article. |
WarningInfo | Contains information about a warning that Aspose.Words issued during document loading or saving. To learn more, visit the Programming with Documents documentation article. |
WarningInfoCollection | Represents a typed collection of WarningInfo objects. To learn more, visit the Programming with Documents documentation article. |
Watermark | Represents class to work with document watermark. To learn more, visit the Working with Watermark documentation article. |
Enumerations
Enumeration | Description |
---|---|
BaselineAlignment | Specifies fonts vertical position on a line. |
BorderType | Specifies sides of a border. To learn more, visit the Programming with Documents documentation article. |
BreakType | Specifies type of a break inside a document. |
CalendarType | Specifies the type of a calendar. |
ChapterPageSeparator | Defines the separator character that appears between the chapter and page number. |
ConditionalStyleType | Represents possible table areas to which conditional formatting may be defined in a table style. |
ContentDisposition | Enumerates different ways of presenting the document at the client browser. |
DropCapPosition | Specifies the position for a drop cap text. |
EditorType | Specifies the set of possible aliases (or editing groups) which can be used as aliases to determine if the current user shall be allowed to edit a single range defined by an editable range within a document. |
EmphasisMark | Specifies possible types of emphasis mark. |
HeaderFooterType | Identifies the type of header or footer found in a Word file. |
HeightRule | Specifies the rule for determining the height of an object. |
HtmlInsertOptions | Specifies options for the DocumentBuilder.insert_html() method. |
ImportFormatMode | Specifies how formatting is merged when importing content from another document. |
LineNumberRestartMode | Determines when automatic line numbering restarts. |
LineSpacingRule | Specifies line spacing values for a paragraph. |
LineStyle | Specifies line style of a Border. |
LoadFormat | Indicates the format of the document that is to be loaded. |
Margins | Specifies preset margins. |
MeasurementUnits | Specifies the unit of measurement. |
NodeChangingAction | Specifies the type of node change. |
NodeType | Specifies the type of a Word document node. |
NumberStyle | Specifies the number style for a list, footnotes and endnotes, page numbers. |
Orientation | Specifies page orientation. |
OutlineLevel | Specifies the outline level of a paragraph in the document. |
PageBorderAppliesTo | Specifies which pages the page border is printed on. |
PageBorderDistanceFrom | Specifies the positioning of the page border relative to the page margin. |
PageVerticalAlignment | Specifies vertical justification of text on each page. |
PaperSize | Specifies paper size. |
ParagraphAlignment | Specifies text alignment in a paragraph. |
ProtectionType | Protection type for a document. |
RevisionType | Specifies the type of change being tracked in Revision. |
RevisionsView | Allows to specify whether to work with the original or revised version of a document. |
SaveFormat | Indicates the format in which the document is saved. |
SectionLayoutMode | Specifies the layout mode for a section allowing to define the document grid behavior. |
SectionStart | The type of break at the beginning of the section. |
StoryType | Text of a Word document is stored in stories. StoryType identifies a story. |
StyleIdentifier | Locale independent style identifier. |
StyleType | Represents type of the style. |
TabAlignment | Specifies the alignment/type of a tab stop. |
TabLeader | Specifies the type of the leader line displayed under the tab character. |
TextDmlEffect | Dml text effect for text runs. |
TextEffect | Animation effect for text runs. |
TextOrientation | Specifies orientation of text on a page, in a table cell or a text frame. |
TextureIndex | Specifies shading texture. |
Underline | Indicates type of the underline applied to a font. |
VisitorAction | Allows the visitor to control the enumeration of nodes. |
WarningSource | Specifies the module that produces a warning during document loading or saving. |
WarningType | Specifies the type of a warning that is issued by Aspose.Words during document loading or saving. |
WatermarkLayout | Defines layout of the watermark relative to the watermark center. |
WatermarkType | Specifies the watermark type. |