Package com.aspose.words

The com.aspose.words package provides classes for generating, converting and modifying Microsoft Word documents without utilizing Microsoft Word.

Aspose.Words is written completely in Java. Microsoft Word is not required in order to use Aspose.Words.

The classes in the com.aspose.words package 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 namespace are:

The com.aspose.words package also contains classes that form the reporting engine of Aspose.Words. The reporting engine allows to quickly and easily populate documents designed in Microsoft Word with data from various data sources such as java.sql.ResultSet, array of ResultSets, com.aspose.words.ResultSetHashMap or an array of values.

The MailMerge object which provides access to the reporting functionality is available via the Document.MailMerge property.

Class Summary
Body Represents a container for the main text of a section.
Bookmark Represents a single bookmark.
BookmarkCollection A collection of Bookmark objects that represent the bookmarks in the specified range.
BookmarkEnd Represents an end of a bookmark in a Word document.
BookmarkStart Represents a start of a bookmark in a Word document.
Border Represents a border of an object.
BorderCollection A collection of Border objects.
BuildingBlock Represents a glossary document entry such as a Building Block, AutoText or an AutoCorrect entry.
BuildingBlockCollection A collection of BuildingBlock objects in the document.
BuiltInDocumentProperties A collection of built-in document properties.
Cell Represents a table cell.
CellCollection Provides typed access to a collection of Cell nodes.
CellFormat Represents all formatting for a table cell.
Comment Represents a container for text of a comment.
CompatibilityOptions Contains compatibility options (that is, the user preferences entered on the Compatibility tab of the Options dialog in Microsoft Word).
CompositeNode Base class for nodes that can contain other nodes.
ConvertUtil Provides helper functions to convert between various measurement units.
CustomDocumentProperties A collection of custom document properties.
CustomXmlProperty Represents a single custom XML attribute or a smart tag property.
CustomXmlPropertyCollection Represents a collection of custom XML attributes or smart tag properties.
Document Represents a Word document.
DocumentBase Provides the abstract base class for a main document and a glossary document of a Word document.
DocumentBuilder Provides methods to insert text, images and other content, specify font, paragraph and section formatting.
DocumentProperty Represents a custom or built-in document property.
DocumentPropertyCollection Base class for BuiltInDocumentProperties and CustomDocumentProperties collections.
DocumentVisitor Base class for custom document visitors.
DropDownItemCollection A collection of strings that represent all the items in a drop-down form field.
ExportImageSavingEventArgs Provides data for the ExportImageSavingEventHandler.
Field Represents a Microsoft Word field.
FieldChar Base class for nodes that represent field characters in a document.
FieldEnd Represents an end of a Word field in a document.
FieldSeparator Represents a Word field separator that separates the field code from the field result.
FieldStart Represents a start of a Word field in a document.
Fill Defines a fill for a shape.
Font Contains font attributes (font name, font size, color, and so on) for an object.
FontInfo Specifies the properties for a font used in a document.
FontInfoCollection Represents a collection of fonts used in a document.
Footnote Represents a container for text of a footnote or endnote.
FootnoteOptions Represents the footnote or endnote numbering options for a document or section.
FormField Represents a single form field.
FormFieldCollection A collection of FormField objects that represent all the form fields in a range.
GlossaryDocument Represents the root element for a glossary document within a Word document. A glossary document is a storage for AutoText, AutoCorrect entries and Building Blocks.
GroupShape Represents a group of shapes in a document.
HeaderFooter Represents a container for the header or footer text of a section.
HeaderFooterCollection Provides typed access to HeaderFooter nodes of a Section.
ImageData Defines an image for a shape.
ImageSize Contains information about image size and resolution.
Inline Base class for inline-level nodes that consist of a single run of text with font formatting.
InlineStory Base class for inline-level nodes that can contain paragraphs and tables.
License Provides methods to license the component.
List Represents formatting of a list.
ListCollection Stores and manages formatting of bulleted and numbered lists used in a document.
ListFormat Allows to control what list formatting is applied to a paragraph.
ListLevel Defines formatting for a list level.
ListLevelCollection A collection of list formatting for each level in a list.
MailMerge Represents the mail merge functionality.
MappedDataFieldCollection Allows to automatically map between names of fields in your data source and names of mail merge fields in the document.
MergeFieldEventArgs Provides data for the MergeField event.
MergeFieldEventArgsBase Base class for MergeFieldEventArgs and MergeImageFieldEventArgs.
MergeImageFieldEventArgs Provides data for the MergeImageFieldEventHandler event.
Node Base class for all nodes of a Word document.
NodeChangedEventArgs Provides data for the NodeChangedEventHandler.
NodeCollection Represents a collection of nodes of a specific type.
NodeImporter Allows to efficiently perform repeated import of nodes from one document to another.
NodeList Represents a collection of nodes.
OleFormat Provides access to the data of an OLE object or ActiveX control.
PageSetup Represents the page setup properties of a section.
Paragraph Represents a paragraph of text.
ParagraphCollection Provides typed access to a collection of Paragraph nodes.
ParagraphFormat Represents all the formatting for a paragraph.
Range Represents a contiguous area in a document.
ReplaceEvaluatorArgs Provides data for a custom replace operation.
ResultSetHashMap Used by MailMerge.executeWithRegions(com.aspose.words.ResultSetHashMap) to perform mail merge with regions.
Row Represents a table row.
RowCollection Provides typed access to a collection of Row nodes.
RowFormat Represents all formatting for a table row.
Run Represents a run of characters with the same font formatting.
RunCollection Provides typed access to a collection of Run nodes.
SaveOptions Provides various options that control how a document is saved.
Section Represents a single section in a document.
SectionCollection A collection of Section objects in the document.
Shading Contains shading attributes for an object.
Shape Represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture.
ShapeBase Base class for objects in the drawing layer, such as an AutoShape, freeform, OLE object, ActiveX control, or picture.
SmartTag This element specifies the presence of a smart tag around one or more inline structures (runs, images, fields,etc.) within a paragraph.
SpecialChar Base class for special characters in the document.
Story Base class for elements that contain block-level nodes Paragraph and Table.
Stroke Defines a stroke for a shape.
Style Represents a single built-in or user-defined style.
StyleCollection A collection of Style objects that represent both the built-in and user-defined styles in a document.
Table Represents a table in a Word document.
TableCollection Provides typed access to a collection of Table nodes.
TabStop Represents a single custom tab stop. The TabStop object is a member of the TabStopCollection collection.
TabStopCollection A collection of TabStop objects that represent custom tabs for a paragraph or a style.
TextBox Defines attributes that specify how a text is displayed inside a shape.
TextColumn Represents a single text column. TextColumn is a member of the TextColumnCollection collection. The TextColumns collection includes all the columns in a section of a document.
TextColumnCollection A collection of TextColumn objects that represent all the columns of text in a section of a document.
TextPath Defines the text and formatting of the text path (of a WordArt object).
VariableCollection A collection of document variables.
ViewOptions Provides various options that control how a document is shown in Microsoft Word.
WriteProtection Specifies write protection settings for a document.
 

Interface Summary
ExportImageSavingEventHandler Represents the method that will handle the HtmlExportImageSaving event.
IMailMergeDataSource Implement this interface to allow mail merge from a custom data source, such as list of objects.
INodeCollection Base interface for node collections. Reserved for internal use.
MergeFieldEventHandler Represents the method that will handle the MergeField event.
MergeImageFieldEventHandler Represents the method that will handle the MergeImageField event.
NodeChangedEventHandler Represents methods that handle NodeInserted, NodeInserting, NodeRemoved and NodeRemoving events.
ReplaceEvaluator The interface that represents a user defined method that is called during a custom find and replace operation.
 

Exception Summary
FileCorruptedException Thrown during document load, when the document appears to be corrupted and impossible to load.
IncorrectPasswordException Thrown if a document is encrypted with a password and the password specified when opening the document is incorrect or missing.
UnsupportedFileFormatException Thrown during document load, when the document format is not recognized or not supported by Aspose.Words.
 

Constant Summary
ArrowLength Utility class containing constants. Length of the arrow at the end of a line.
ArrowType Utility class containing constants. Specifies the type of an arrow at a line end.
ArrowWidth Utility class containing constants. Width of the arrow at the end of a line.
BorderType Utility class containing constants. Specifies sides of a border.
BreakType Utility class containing constants. Specifies type of a break inside a document.
BuildingBlockBehavior Utility class containing constants. Specifies the behavior that shall be applied to the contents of the building block when it is inserted into the main document.
BuildingBlockGallery Utility class containing constants. Specifies the predefined gallery into which a building block is classified.
BuildingBlockType Utility class containing constants. Specifies a building block type. The type might affect the visibility and behavior of the building block in Microsoft Word.
CellMerge Utility class containing constants. Specifies how a cell in a table is merged with other cells.
CellVerticalAlignment Utility class containing constants. Specifies vertical justification of text inside a table cell.
ControlChar Utility class containing constants. Control characters often encountered in documents.
CssStyleSheetType Utility class containing constants. Specifies how CSS (Cascading Style Sheet) styles are exported to HTML.
DashStyle Utility class containing constants. Dashed line style.
DocumentSecurity Utility class containing constants. Used as a value for the BuiltInDocumentProperties.Security property. Specifies the security level of a document as a numeric value.
EndCap Utility class containing constants. Specifies line cap style.
FieldType Utility class containing constants. Enumeration that identifies all different types of Word fields.
FlipOrientation Utility class containing constants. Possible values for the orientation of a shape.
FontFamily Utility class containing constants. Represents the font family.
FontPitch Utility class containing constants. Represents the font pitch.
FootnoteLocation Utility class containing constants. Defines the footnote or endnote position.
FootnoteNumberingRule Utility class containing constants. Determines when automatic footnote or endnote numbering restarts.
FootnoteType Utility class containing constants. Specifies whether this is a footnote or an endnote.
HeaderFooterType Utility class containing constants. Identifies the type of header or footer found in a Word file.
HeightRule Utility class containing constants. Specifies the rule for determining the height of an object.
HorizontalAlignment Utility class containing constants. Specifies horizontal alignment of a floating shape, text frame or floating table.
ImageType Utility class containing constants. Specifies the type (format) of an image in a Microsoft Word document.
ImportFormatMode Utility class containing constants. Specifies how formatting is merged when importing content from another document.
JoinStyle Utility class containing constants. Line join style.
LayoutFlow Utility class containing constants. Determines the flow of the text layout in a textbox.
LineNumberRestartMode Utility class containing constants. Determines when automatic line numbering restarts.
LineSpacingRule Utility class containing constants. Specifies line spacing values for a paragraph.
LineStyle Utility class containing constants. Specifies line style of a Border.
ListLevelAlignment Utility class containing constants. Specifies alignment for the list number or bullet.
ListTemplate Utility class containing constants. Specifies one of the predefined list formats available in Microsoft Word.
ListTrailingCharacter Utility class containing constants. Specifies the character that separates the list label from the text of the paragraph.
LoadFormat Utility class containing constants. Indicates the format of the document that is to be loaded.
NodeChangedAction Utility class containing constants. Specifies the type of node change.
NodeType Utility class containing constants. Specifies the type of a Word document node.
NumberStyle Utility class containing constants. Specifies the number style for a list, footnotes and endnotes, page numbers.
Orientation Utility class containing constants. Specifies page orientation.
OutlineLevel Utility class containing constants. Specifies the outline level of a paragraph in the document.
PageBorderAppliesTo Utility class containing constants. Specifies which pages the page border is printed on.
PageBorderDistanceFrom Utility class containing constants. Specifies the positioning of the page border relative to the page margin.
PageVerticalAlignment Utility class containing constants. Specifies vertical justification of text on each page.
PaperSize Utility class containing constants. Specifies paper size.
PaperTray Utility class containing constants. Specifies the paper tray (bin) where the printer needs to take the paper from.
ParagraphAlignment Utility class containing constants. Specifies text alignment in a paragraph.
PropertyType Utility class containing constants. Specifies data type of a document property.
ProtectionType Utility class containing constants. Protection type for a document.
RelativeHorizontalPosition Utility class containing constants. Specifies to what the horizontal position of a shape or text frame is relative.
RelativeVerticalPosition Utility class containing constants. Specifies to what the vertical position of a shape or text frame is relative.
ReplaceAction Utility class containing constants. Allows the user to specify what happens to the current match during a replace operation.
RowAlignment Utility class containing constants. Specifies alignment for a table row.
SaveFormat Utility class containing constants. Indicates the format in which the document is saved.
SaveType Utility class containing constants. Enumerates different ways of presenting the document at the client browser.
SectionStart Utility class containing constants. The type of break at the beginning of the section.
ShapeLineStyle Utility class containing constants. Specifies the compound line style of a Shape.
ShapeType Utility class containing constants. Specifies the type of shape in a Microsoft Word document.
StoryType Utility class containing constants. Text of a Word document is stored in stories. StoryType identifies a story.
StyleIdentifier Utility class containing constants. Locale independent style identifier.
StyleType Utility class containing constants. Represents type of the style.
TabAlignment Utility class containing constants. Specifies the alignment/type of a tab stop.
TabLeader Utility class containing constants. Specifies the type of the leader line displayed under the tab character.
TextBoxWrapMode Utility class containing constants. Specifies how text wraps inside a shape.
TextEffect Utility class containing constants. Animation effect for text runs.
TextFormFieldType Utility class containing constants. Specifies the type of a text form field.
TextOrientation Utility class containing constants. Specifies orientation of text in a table cell or a text frame.
TextPathAlignment Utility class containing constants. WordArt alignment.
TextureIndex Utility class containing constants. Specifies shading texture.
Underline Utility class containing constants. Indicates type of the underline applied to a font.
VerticalAlignment Utility class containing constants. Specifies vertical alignment of a floating shape, text frame or a floating table.
ViewType Utility class containing constants. Possible values for the view mode in Microsoft Word.
VisitorAction Utility class containing constants. Allows the visitor to control the enumeration of nodes.
WrapSide Utility class containing constants. Specifies what side(s) of the shape or picture the text wraps around.
WrapType Utility class containing constants. Specifies how text is wrapped around a shape or picture.
ZoomType Utility class containing constants. Possible values for how large or small the document appears on the screen in Microsoft Word.
 

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.