The following tables provide implementation details about how Aspose.Words loads a document in the FlatOPC XML format.
Office Open XML (OOXML) is the new XML-based format introduced in Microsoft Office 2007 applications. Office Open XML is a container format for several specialized XML-based markup languages. WordprocessingML is the markup language used by Microsoft Office Word to store its DOCX documents.
Aspose.Words supports all major OOXML versions:
· Microsoft Word 2007 (OOXML ECMA-376)
· Microsoft Word 2010 (OOXML ISO/IEC DIS 29500)
OOXML WordprocessingML documents most often come as DOCX files, which are ZIP packages. In addition to DOCX, Aspose.Words also supports loading and saving OOXML in the “plain XML” Flat OPC format.
Aspose.Words provides extensive support for loading, saving and converting WordprocessingML documents.
See the following links in the documentation for further information:
· Loading, Saving and Converting
· Aspose.Words Document Object Model
· Document
Feature |
Supported |
Comment |
See Also |
Attached Template |
Yes |
Attached template is used to reference styles and other settings through the use of a separate document template. The link to this template is imported from the source document and can be found in the API as the Document.AttachedTemplate property. |
· Document.AttachedTemplate |
Built-In Properties |
Yes |
All Built-in Document Properties can be accessed and modified in Aspose.Words API. There are methods to update the "count" properties such as character, word and page count. All such properties are supported with the exception of the "line" count which is currently not updated. |
· Document.BuiltInDocumentProperties · Document.UpdatePageLayout · Document.UpdateWordCount |
Custom Properties |
Yes |
Custom Document Properties can be created, accessed and modified through the API. |
· Document.CustomDocumentProperties |
Custom Payload Part |
Yes |
Only Custom Payload Parts that are attached to the root of the package are preserved on load. Custom Parts can be accessed through the Aspose.Words API. |
· Document.PackageCustomParts |
Custom XML Data Storage |
Yes |
Custom XML Parts can be accessed and modified in the DOM. You can remove schemas linked to a part, however you cannot schemas in the document that are not referenced. This feature will be supported in a future version. |
· Document.CustomXmlParts |
Digital Signature |
Yes |
A digital signature ensures that the content of a document has not been tampered with during transit. A signature is applied over the document so if any part of it is modified the signature is invalidated. When you load a document into Aspose.Words the document signature is automatically lost. This is by design as the document is not the same anymore. You will need to reapply another signature during export, however currently Aspose.Words only signs PDF documents on output. There are plans to support signing documents on export when saving in the OOXML, DOC, ODT or XPS format. Detection, access and verification of digital signatures is supported. Signing a OOXML document is not yet supported. |
· Working with Digital Signatures · Document.DigitalSigntures · DigitalSignatureCollection.IsValid |
Embedded Package |
Yes |
Embedded packages are generally supported by Aspose.Words. There are two ways documents can be embedded inside other documents: · OLE (this is available in DOC and OOXML formats) · Package Embedding (available in OOXML only) Content can be extracted from both types of embedded packages by using the OleFormat.Save method. Aspose.Words supports these in the following ways during conversion: If you have an OLE embedded or linked object it will be preserved during any conversion (e.g. DOC to DOCX or DOCX to DOC etc). If you have a Package Embedded document, then it will only be preserved during DOCX to DOCX conversion. There is no way to save a Package Embedded document from DOCX into a DOC file without converting it into an OLE embedded object. Implementing conversion of Package Embedded to OLE is tricky and it will take a while to implement. OLE objects contain "native data" and are supposed to be created by the actual OLE creating application. We at Aspose.Words have never attempted or planned to replace the behavior of OLE creating applications. |
· Shape.OleFormat |
Encryption |
Yes |
Encrypted documents can be loaded into Aspose.Words as long as the password supplied on load for the document is correct. XOR obfuscation is currently unsupported. Encrypting a document during save is currently unsupported with the exception when saving in DOC format. Opening documents encrypted using the ECMA-376 Standard Encryption or Agile Encryption is supported Opening documents encrypted using the Extensible Encryption is not supported. |
· LoadOptions.Password · FileFormatInfo.IsEncrypted |
Font Table |
Yes |
|
|
Glossary Document/Quick Parts/Auto Text |
Yes |
Glossary Document for DOCX is accessiable through the DOM. |
· Document.GlossaryDocument |
Hyphenation |
Yes |
There is currently no API to access and modify hypenation settings in a document. |
· ParagraphFormat.SuppressAutoHyphens |
Key Map Customizations |
Yes |
|
|
Mail Merge Recipient Data |
Yes |
|
· Document.MailMergeSettings |
Office Math |
Yes |
Office math content is accessable through the DOM. |
· OfficeMath |
Themes |
Yes |
There is currently no API to access information about Themes however they are preserved when exporting to most formats. Themes are preserved during open/save cycle. |
|
Toolbar Customizations |
Yes |
|
|
Variables |
Yes |
Variables allow you to store additional information in the document which is "hidden" from the main document. This can be used to embed custom tracking data in the document itself. |
· Document.Variables |
VBA Project (Macro) |
Yes |
VBA Projects are preserved during open and save to different formats that support them. This means you can load an existing template/document and add content to it and the VBA Projects will remain properly. There is no API to access the code behind or execute any of the macros. There is a method provided to remove all macros from a document. |
· Document.RemoveMacros |
VBA Project Digital Signature |
Yes |
The digital signature on a VBA Project is preserved during open and save even if the document content is modified. |
|
Background |
Yes |
A background of a Word document can be a solid color or an image. |
· Document.BackgroundShape |
Thumbnail |
Planned |
|
· BuiltInDocumentProperties.Thumbnail |
Feature |
Supported |
Comment |
See Also |
Embed Fonts |
Planned |
Currently embedding new fonts into a document is unsupported. |
|
Access and Use Embedded Fonts |
Yes |
Embedded fonts in DOCX are preserved and can be accessed through the API. |
· FontInfo · FontInfo.GetEmbeddedFont |
Feature |
Supported |
Comment |
See Also |
Bibliography |
Yes |
Bibliography content is preserved on import. Updating a bibliography is currently unsupported. |
|
Sources/Citations |
Yes |
Sources and citations are preserved during import. Inserting new sources is not supported. |
|
Citation Style |
Yes |
Document-wide citation style is preserved but there is no access to this setting in the DOM. |
|
Aspose.Words supports most document protection features.
Using Aspose.Words you can open a document that is password protected even without the password (as long as its not encrypted).
Once loaded you can remove any protection from a document.
See the following links in the documentation for further information:
· Document.Protect
· Document.Unprotect
Feature |
Supported |
Comment |
See Also |
Allow Only Comments |
Yes |
|
· Document.ProtectionType |
Allow Only Form Fields |
Yes |
|
· Document.ProtectionType |
Allow Only Revisions |
Yes |
When this protection type is enabled, tracked changes are automatically turned on. |
· Document.ProtectionType · Document.TrackChanges |
Limit Formatting to Selection of Styles |
Yes |
This setting is retained during round-trip. There is currently no way to modify these settings in the API. |
|
Protection Password (Legacy) |
Yes |
|
· WriteProtection.SetPassword |
Protection Password (OOXML) |
Yes |
|
· WriteProtection.SetPassword |
Protected Sections |
Yes |
|
· Section.ProtectedForForms |
Protection Ranges |
Planned |
Currently protected ranges are lost upon import. |
|
Read Only |
Yes |
|
· Document.WriteProtection · WriteProtection.IsWriteProtected |
Feature |
Supported |
Comment |
See Also |
Asian Typography Settings |
Yes |
|
|
Compatibility Options |
Yes |
|
· Document.CompatibilityOptions |
Endnote Options |
Yes |
|
· Document.EndnoteOptions |
Footnote Options |
Yes |
|
· Document.FootnoteOptions |
Mail Merge Settings |
Yes |
You can modify all mail merge settings, as well as setting a new mail merge data source for the document to use. |
· Document.MailMergeSettings |
Print Settings |
Yes |
|
· Section.PageSetup |
Show/Hide Settings |
Yes |
|
|
View Settings |
Yes |
|
· Document.ViewOptions |
Web Settings |
Yes |
|
|
XML Settings |
Yes |
|
|
Each paragraph in a document is represented in Aspose.Words as a Paragraph node. A paragraph represesents a block of text in a document and have a variety of properties and styles.
Using Aspose.Words you can access and change virtually all properties of a paragraph. Nearly all paragraph attributes are supported. You can also easily insert and remove paragraphs.
Paragraph formatting is contained within the ParagraphFormat class which is linked to the paragraph.
See the following links in the documentation for further information:
· Paragraph
· Paragraph.ParagraphFormat
Feature |
Supported |
Comment |
See Also |
Paragraph Style |
Yes |
|
· ParagraphFormat · ParagraphFormat.Style |
Alignment |
Yes |
The special "Thai Distributed" alignment is also supported during conversion. There is currently no API to access or modify this alignment. |
· ParagraphFormat.Alignment |
Right to Left Paragraph |
Yes |
|
· ParagraphFormat.Bidi |
Bullets and Numbers |
Yes |
|
· ParagraphFormat.ListFormat · ParagraphFormat.ListLabel |
Outline Level |
Yes |
|
· ParagraphFormat.OutlineLevel |
Run Properties for the Paragraph Mark |
Yes |
|
· ParagraphFormat.ParagraphBreakFont |
Suppress Line Numbers |
Yes |
|
· ParagraphFormat.SurpressLineNumbers |
Suppress Hyphenation |
Yes |
|
· ParagraphFormat.SurpressAutoHyphens |
Feature |
Supported |
Comment |
See Also |
Left Indent |
Yes |
|
· ParagraphFormat.LeftIndent |
Right Indent |
Yes |
|
· ParagraphFormat.RightIndent |
First Line Indent |
Yes |
|
· ParagraphFormat.FirstLineIndent |
Hanging Indent |
Yes |
|
· ParagraphFormat.FirstLineIndent |
Mirror Indents |
Yes |
|
· ParagraphFormat.LeftIndent · ParagraphFormat.RightIndent |
Automatically Adjust Right Indent |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Space Before |
Yes |
|
· ParagraphFormat.SpaceBefore |
Space After |
Yes |
|
· ParagraphFormat.SpaceAfter |
Space Auto |
Yes |
|
· ParagraphFormat.SpaceBeforeAuto · ParagraphFormat.SpaceAfterAuto |
Line Spacing |
Yes |
|
· ParagraphFormat.LineSpacing · ParagraphFormat.LineSpacingRule |
No Space between Conforming Paragraphs |
Yes |
|
· ParagraphFormat.NoSpaceBetweenParagraphsOfSameStyle |
Snap To Grid |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Widow/Orphan Control |
Yes |
|
· ParagraphFormat.WidowControl |
Keep With Next |
Yes |
|
· ParagraphFormat.KeepWithNext |
Keep Lines Together |
Yes |
|
· ParagraphFormat.KeepTogether |
Page Break Before |
Yes |
|
· ParagraphFormat.PageBreakBefore |
This is the legacy text frames from Word 97, not to be confused with the Autoshape Textbox which is discussed under Drawing Objects.
Text frames are preserved in the model but there is no API or node to modify or access information about frames.
Feature |
Supported |
Comment |
See Also |
Text Frames |
Yes |
|
|
All features of tab stops are supported in Aspose.Words except for relative tab stops.
Using Aspose.Words you can find tab stops based off position or index. You can change tab stop features like position, alignment etc or remove tabstops completely.
See the following link in the documentation for further information:
· ParagraphFormat.TabStops
Feature |
Supported |
Comment |
See Also |
Absolute Position |
Yes |
|
· TabStop.Position |
Relative Position |
Yes |
A relative position tab can be inserted in Microsoft Word using the "Insert Alignment Tab" button. This type of tab is relative to either the page margin or the indent of the paragraph. This allows tab stops to appear in the same relative place even when the position of the paragraph or page is modified. Currently Aspose.Words supports these types of tab stops in OOXML and WordML formats only. There is currently no API to retrieve the properties of this tab e.g RelativeTo, Alignment, Leader etc. Further support is planned. |
· AbsolutePositionTab |
Alignment: Left, Center, Right, Decimal, Bar |
Yes |
|
· TabStop.Alignment |
Leader |
Yes |
|
· TabStop.Leader |
Drop Caps are partially supported and preserved during document conversion. A drop cap is a text frame which is imported as a separate paragraph (from the rest of the paragraph as seen in the source document).
You can modify drop cap properties and position, however the new settings are not applied to the drop cap. You cannot yet create new drop caps (although you can easily simulate them through the use of a textbox).
This will be improved in a future version of Aspose.Words.
See the following links in the documentation for further information:
· ParagraphFormat.DropCapPositon
· ParagraphFormat.LinesToDrop
Feature |
Supported |
Comment |
See Also |
Drop Caps |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Border Sides |
Yes |
|
· ParagraphFormat.Borders · LineStyle |
Shadow |
Yes |
|
· Border.Shadow |
3D Frame |
Yes |
|
· Border.LineStyle |
Style |
Yes |
|
· Border.LineStyle |
Color |
Yes |
|
· Border.Color |
Width |
Yes |
|
· Border.LineWidth |
Distance from Text |
Yes |
|
· Border.DistanceFromText |
See the following link in the documentation for further information:
· ParagraphFormat.Shading
Feature |
Supported |
Comment |
See Also |
Shading |
Yes |
|
|
Asian Typography settings is fully supported during conversion. However there is currently no API to access or modify these settings.
Feature |
Supported |
Comment |
See Also |
Use Asian Rules for Controlling First and Last Characters |
Yes |
|
|
Allow Latin Text to Wrap in the Middle of a Word |
Yes |
|
|
Allow Hanging Punctuation |
Yes |
|
|
Allow Punctuation at Start of a Line to Compress |
Yes |
|
|
Automatically Adjust Space between Asian and Latin Text |
Yes |
|
|
Automatically Adjust Space between Asian Text and Numbers |
Yes |
|
|
Text Vertical Alignment |
Yes |
|
|
In Aspose.Words DOM all text is represented in the form of Run nodes. A single Run contains not only the string of text but also complex properties which describe how the text appears and behaves in the document. All characters in a Run have identical formatting.
Using Aspose.Words you can insert, move, and remove runs. You can also access and modify all properties of a run.
All formatting of a run is contained within a linked classed called Font.
See the following links in the documentation for further information:
· Run
· Run.Font
· Run.Text
Feature |
Supported |
Comment |
See Also |
Western Languages |
Yes |
|
|
East European Languages |
Yes |
|
|
East Asian Languages |
Yes |
|
|
Right to Left Languages |
Yes |
|
· Font.Bidi · Font.BoldBi · Font.LocaleIdBi |
Carriage Return (not a Paragraph Break) |
Yes |
|
|
Non Breaking Space |
Yes |
|
· ControlChar.NonBreakingSpace |
Non Breaking Hyphen |
Yes |
|
· ControlChar.NonBreakingHyphen |
Soft Hyphen |
Yes |
This type of hyphen is referred to as an "Optional Hyphen" in Microsoft Word documents. |
· ControlChar.OptionalHyphen |
Symbol |
Yes |
|
|
Tab |
Yes |
|
· ControlChar.Tab |
Feature |
Supported |
Comment |
See Also |
Line Break |
Yes |
|
· ControlChar.LineBreak |
Line Break Clear Type |
Yes |
|
|
Page Break |
Yes |
|
· ControlChar.PageBreak |
Column Break |
Yes |
|
· ControlChar.ColumnBreak |
Feature |
Supported |
Comment |
See Also |
Character Style |
Yes |
|
· Font.Style |
Color |
Yes |
|
· Font.Color |
East Asian Typography |
Yes |
|
|
Highlight Color |
Yes |
|
· Font.HighlightColor |
Language |
Yes |
|
· Font.LocaleId · Font.LocaleIdBi |
Do not Check Spelling or Grammar |
Yes |
|
· Font.NoProofing |
Border |
Yes |
|
· Font.Border |
Shading |
Yes |
|
· Font.Shading |
See the following links in the documentation for further information:
· Font.Bold
· Font.Italics
· Font.Name
· Font.NameFarEast
Feature |
Supported |
Comment |
See Also |
Font |
Yes |
|
|
See the following link in the documentation for further information:
· Font.Underline
Feature |
Supported |
Comment |
See Also |
Underline Type |
Yes |
The underline property is used to both define if the run is underline and with what type of underline is used. |
· Font.Underline |
Underline Color |
Yes |
|
· Font.UnderlineColor |
See the following link in the documentation for further information:
· Font
Feature |
Supported |
Comment |
See Also |
Animated Effect |
Yes |
|
|
Double Strikethrough |
Yes |
|
· Font.DoubleStrikeThrough |
Strikethrough |
Yes |
|
· Font.StrikeThrough |
Subscript/Superscript |
Yes |
|
· Font.Subscript · Font.Superscript |
Shadow |
Yes |
|
· Font.Shadow |
Outline |
Yes |
|
· Font.Outline |
Emboss |
Yes |
|
· Font.Emboss |
Imprint (Engrave) |
Yes |
|
· Font.Engrave |
Small Caps |
Yes |
|
· Font.SmallCaps |
All Caps |
Yes |
|
· Font.AllCaps |
Hidden Text |
Yes |
|
· Font.Hidden |
Special Hidden |
Yes |
|
|
Web Hidden |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Scale |
Yes |
|
· Font.Scaling |
Expanded/Compressed |
Yes |
|
· Font.Spacing |
Vertical Position |
Yes |
|
· Font.Position |
A table is comprised of rows and cells and is used to display data in a grid-like layout.
Aspose.Words supports imports of tables from all loaded formats including Microsoft Word, Open Office and HTML documents.
A table is represented in Aspose.Words by a Table node. Each row of the table is represented by a separate Row node. Likewise each cell of the row is represented by a Cell node. Each node type has it's own formatting properties which controls the table's apperance and behavior.
· Table contains the properties for controlling the formatting of a table as a whole.
· Each Row provides a RowFormat object which contains the properties that control formatting for that particular row.
· Each Cell has a CellFormat object which provides properties to control the formatting of each cell.
Using Aspose.Words you can access and modify all features and formatting of a table along with creating new tables and removing existing ones from the document.
Note that some elements of a table may be wrapped with Markup nodes such as CustomXmlMarkup or StructuredDocumentTag nodes.
See the following links in the documentation for further information:
· Table
Feature |
Supported |
Comment |
See Also |
Nested Tables |
Yes |
|
|
Right To Left Tables |
Yes |
|
· Table.Bidi |
Table Style |
Yes |
Table styles are supported in model and during conversion. A table style can be applied or removed from tables. Only in-built or table styles already in the document can be applied - there is currently no support for creating new table styles. |
· Table.Style · Table.StyleIdentifier |
Conditional Formatting Style |
Yes |
|
· Table.StyleOptions |
Table Alignment |
Yes |
|
· Table.Alignment |
Table Indent |
Yes |
|
· Table.LeftIndent |
Allow AutoFit |
Yes |
|
· Table.AllowAutoFit |
Default Cell Margins |
Yes |
|
· Table.LeftPadding · Table.RightPadding · Table.BottomPadding · Table.TopPadding |
Default Cell Spacing |
Yes |
|
· Table.CellSpacing |
Preferred Table Width |
Yes |
Preferred width on table can be set to absolute (points), relative (percent) or auto setting. |
· Table.PreferredWidth |
Table Shading |
Yes |
|
· Table.SetShading |
Hidden |
Yes |
There is currently no API to access or modify this property on Table or Row. |
|
Floating tables are supported during import and export. However there is currently no API to access or modify the floating position of a table.
Feature |
Supported |
Comment |
See Also |
Floating Tables |
Yes |
|
|
Table borders are stored in the rows of the table. This mimics the structure of an OOXML document.
If you try to set borders or shading on a table without any rows then an exception will be thrown. Add at least one row first.
See the following links in the documentation for further information:
· Table.SetBorders
· Table.ClearBorders
· RowFormat.Borders
Feature |
Supported |
Comment |
See Also |
Table Borders |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Allow Break Across Pages |
Yes |
|
· Keeping Tables and Rows from Breaking across Pages · RowFormat.AllowBreakAcrossPages |
Repeat as Header Row |
Yes |
|
· Specifying Rows to Repeat on Subsequent Pages as Header Rows · RowFormat.HeadingFormat |
Height |
Yes |
|
· RowFormat.Height |
Height Rule |
Yes |
|
· RowFormat.HeightRule |
Feature |
Supported |
Comment |
See Also |
Cell Margins |
Yes |
|
· CellFormat.TopPadding · CellFormat.BottomPadding · CellFormat.LeftPadding · CellFormat.RightPadding |
Borders |
Yes |
|
· CellFormat.Borders |
Shading |
Yes |
|
· CellFormat.Shading |
Wrap Text |
Yes |
|
· CellFormat.WrapText |
Fit Text |
Yes |
|
· CellFormat.FitText |
Preferred Width |
Yes |
|
· CellFormat.PreferredWidth |
Merged Horizontally |
Yes |
|
· CellFormat.HorizontalMerge |
Merged Vertically |
Yes |
|
· CellFormat.VerticalMerge |
Vertical Alignment |
Yes |
|
· CellFormat.VerticalAlignment |
Text Direction |
Yes |
|
· CellFormat.Orientation |
Custom Markup are elements that added to parts of the document which allow extra information to be embedded within that particular document feature.
For example, CustomXML markup can be wrapped around a paragraph in the document and user-defined data added to it. This data can then be retrieved from that paragraphs when required.
Represented in Aspose.Words DOM as a CustomXmlMarkup node.
You can create and remove CustomXmlMarkup in a document. You can also access the properties of the XML markup node.
See the following link in the documentation for further information:
· CustomXmlMarkup
Feature |
Supported |
Comment |
See Also |
CustomXML |
Yes |
|
|
Represented in Aspose.Words DOM as a StructuredDocumentTag node.
You can insert new Structured Document Tags and remove existing ones from the document. There is also a rich API for accessing the various properties of SDTs.
Currently Content Controls linked to Custom XML Data Storage are not supported during import. The default value of the tag is imported instead which may appear as if the wrong text is being displayed when compared to opening the document in Microsoft Word.
See the following link in the documentation for further information:
· StructuredDocumentTag
Feature |
Supported |
Comment |
See Also |
Content Controls (Structured Document Tags) |
Yes |
|
|
SmartTags are fully supported in Aspose.Words. They are represented in Aspose.Words DOM as a SmartTag node.
See the following links in the documentation for further information:
· SmartTag
· Document.RemoveSmartTags
Feature |
Supported |
Comment |
See Also |
Smart Tag Properties |
Yes |
|
· SmartTag.Properties |
Sections allow you to divide parts of the document so page formatting and headers and footers apply only to that part of the document. This allows for example different parts of the document to completley different page sizes or page orientations.
A section is represented as a Section node in the Aspose.Words model.
Aspose.Words supports the creation and deletion of sections in a document, along with accessing and modifying all section properties.
See the following links in the documentation for further information:
· Section
· Document.Sections
Each Header and Footer in a document is stored per section. Each header or footer is imported into Aspose.Words as a HeaderFooter node. This node is always a child of a Section.
Most documents have header or footer content represented by the primary header or footer. This displays content on all pages of the section. There is also different types of headers and footers to display different content on the first page or even/odd pages of the header footer.
There can be up to three different types of headers and three different types of footers per section. You can only have one type of the header or footer per section.
In Aspose.Words this is represented by Header Footer nodes of different types. The different types are:
· HeaderFirst
· HeaderPrimary
· HeaderEven
· FooterFirst
· FooterPrimary
· FooterEven
See the following links in the documentation for further information:
· Section.HeadersFooters
· PageSetup.DifferentFirstPageHeaderFooter
· PageSetup.OddAndEvenPageHeaderFooter
· HeaderFooterCollection.LinkToPrevious
Feature |
Supported |
Comment |
See Also |
Different First Page |
Yes |
|
|
Different Even and Odd Pages |
Yes |
Note that setting a Microsoft Word Document to display even or odd header footers applies to the entire document. If you set this option in Microsoft Word then all sections follow this rule. Even though this is a documentw-wide setting, in Aspose.Words this property appears per section as a PageSetup property. Changing this property affects all sections in the document. |
|
Continue from Previous Section |
Yes |
In a Microsoft Word document a header or footer can be linked to the previous section. This means the same headers and footers from the section before will be displayed for this section as well. In some cases you can check this by using the HeaderFooter.LinkedToPrevious property. In Aspose.Words, the different situations are represented in the model as follows: · If a document has no headers or footers of a certain type then no Section node contains any child Header Footer of that type. · If header or footer is not linked to the previous section (the header of footer is different from the previous section) then the Section node will have its own Header Footer node of that type. This is the same for each type of header or footer that is not linked in the Section. · If a header or footer is linked to the previous section then there will be no header or footer of that type in the current section. This means that a section that appears to have no header or footer nodes can still be displaying headers and footers as they come from previous sections. Check the HeaderFooter.LinkedToPrevious property. · If a header or footer is not linked to the previous section but it simply blank (no content) then there will be a header or footer in that section, however it will contain no content (no runs). You can link/unlink header footers from previous sections by using the HeaderFooter.LinkToPrevious method. If you unlink a headerfooter from the previous section using Microsoft Word, the content from the previous header or footer is copied over. In Aspose.Words however the header footer is unlinked but left blank. You can copy the content from the previous section if required. Note that you can choose to unlink all headers and footers of all types or just a particular type. For example the primary header footer can be different whereas the primary footer can still be linked to the previous section. |
|
See the following links in the documentation for further information:
· PageSetup.SectionStart
· DocumentBuilder.InsertBreak
Feature |
Supported |
Comment |
See Also |
Continuous |
Yes |
|
|
Even Page |
Yes |
|
|
Odd Page |
Yes |
|
|
Next Column |
Yes |
|
|
Next Page |
Yes |
|
|
See the following link in the documentation for further information:
· PageSetup.TextColumns
Feature |
Supported |
Comment |
See Also |
Text Columns |
Yes |
|
|
See the following links in the documentation for further information:
· PageSetup
· PageSetup.LeftMargin
· PageSetup.FooterDistance
· PageSetup.Gutter
Feature |
Supported |
Comment |
See Also |
Page Margins |
Yes |
|
|
See the following links in the documentation for further information:
· PageSetup.PageNumberingStyle
· PageSetup.PageStartingNumber
· PageSetup.RestartPageNumbering
Feature |
Supported |
Comment |
See Also |
Page Numbering |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Right to Left Section |
Yes |
|
· PageSetup.Bidi |
Line Numbering |
Yes |
|
· PageSetup.LineNumberCountBy · PageSetup.LineNumberDistanceFromText · PageSetup.LineNumberRestartMode · PageSetup.LineStartingNumber |
Paper Source |
Yes |
|
· PageSetup.FirstPageTray · PageSetup.OtherPageTray |
Paper Size |
Yes |
|
· PageSetup.PaperSize |
Orientation |
Yes |
|
· PageSetup.Orientation |
Protection |
Yes |
|
· Section.ProtectedForForms |
Text Direction |
Yes |
|
|
Vertical Alignment |
Yes |
|
· PageSetup.VerticalAlignment |
Asian Document Grid |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Chapter Numbering |
Yes |
|
|
See the following links in the documentation for further information:
· PageSetup.Borders
· PageSetup.PageBorderAppliesTo
· PageSetup.BordersAlwaysInFront
· PageSetup.BordersSurroundsHeader
Feature |
Supported |
Comment |
See Also |
Page Border |
Yes |
|
|
A style allows you to define a set of formatting that can be reused on many elements in a document. This saves time and allows for a more consistent formatting throughout your document.
A style loaded into a document is represented in the Aspose.Words DOM by the Style class. You can access or modify any type of style (both in-built or custom) in a document.
You can also create a new style from scratch (with the exception of a table style which new styles cannot be created for currently). You can choose to set any style you want to document elements
You currently cannot rename a style name or remove an exisiting style from a document. Copying styles from one document to another is also unsupported, however for the time being you can achieve this by copying a node with a style to another document. This will copy the source style along with it.
See the following links in the documentation for further information:
· Document.Styles
· Style
· Style.Name
Feature |
Supported |
Comment |
See Also |
Paragraph Style |
Yes |
|
· StyleType.Paragraph |
Character Style |
Yes |
|
· StyleType.Character |
List Style |
Yes |
|
· StyleType.List |
Table Style |
Yes |
|
· Table.Style · TableStyle · StyleType.Table |
Feature |
Supported |
Comment |
See Also |
Aliases |
Yes |
|
|
Based On |
Yes |
|
· Style.BaseStyleName |
Built-in Styles |
Yes |
|
· Style.BuiltIn · Style.StyleIdentifier |
Custom Styles |
Yes |
|
|
Linked Styles |
Yes |
|
|
Style Name |
Yes |
|
· Style.Name |
Next Style |
Yes |
|
· Style.NextParagraphStyleName |
Paragraph Properties |
Yes |
|
· Style.ParagraphFormat |
Run Properties |
Yes |
|
· Style.Font |
Bullets and Numbering |
Yes |
|
· Style.List · Style.ListFormat |
Feature |
Supported |
Comment |
See Also |
Paragraph Properties |
Yes |
|
|
Run Properties |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Apply Formatting to |
Yes |
|
· Table.StyleOptions |
Table Properties |
Yes |
|
· TableStyle |
Banding |
Yes |
|
· Table.StyleOptions |
Paragraph Properties |
Yes |
|
· TableStyle.ParagraphFormat |
Run Properties |
Yes |
|
· TableStyle.Font |
A list used in a document is actually made up of many complex parts. List and their properties are fully supported by Aspose.Words.
There are two main types of lists:
· Numbered (Ordered)
· Bullet (Unordered)
Most properties of lists are supported by Aspose.Words. You can create new lists, access and modify properties of existing lists. You currently cannot remove an existing list from a document.
In all import formats the list value is not stored with the document, it is calculated dynamically. Aspose.Words automatically calculates the values for all list paragraphs in the document even for complex lists. You can retrieve this value through a property of the ListLabel class.
You can find what paragraphs a list is applied to and work with them manually. There are plans to allow to retrieve a list in the document body as an object. You can remove list formatting from a paragraph however you cannot remove a list reference from a document.
See the following links in the documentation for further information:
· Paragraph.IsListItem
· Paragraph.ListFormat
· Paragraph.ListLabel
· List.ListLevels
Feature |
Supported |
Comment |
See Also |
Single Level |
Yes |
|
|
Multi Level |
Yes |
|
· List.IsMultiLevel |
Name |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Label Alignment |
Yes |
|
· ListLevel.Alignment |
Picture Bullet |
Yes |
Picture bullets are supported, however there is currently no way to set a new picture bullet for a list item. Consider creating a list with the picture bullet first in the document using Microsoft Word and then apply this list to the required paragraphs. |
|
Restart Level |
Yes |
|
· ListLevel.RestartAfterLevel |
Bullet Character |
Yes |
|
|
Label/Format String |
Yes |
|
· ListLabel.LabelString |
Number Format |
Yes |
|
· ListLevel.NumberFormat |
Paragraph Properties |
Yes |
|
|
Font Properties |
Yes |
|
· ListLevel.Font |
Linked Paragraph Style |
Yes |
|
· ListLevel.LinkedStyle |
Starting Value |
Yes |
|
· ListLevel.StartAt |
Text After |
Yes |
|
· ListLevel.TrailingCharacter |
An endnote or footnote is a note that appears at the bottom of a page that is commonly used by writers to cite other authors publication in their document.
Using Aspose.Words you can interact with footnotes and endnotes and access or modify footnote related propeties such as the location of the footnotes and when they restart.
See the following links in the documentation for further information:
· Footnote
· Document.FootnoteOptions
Feature |
Supported |
Comment |
See Also |
Reference Mark |
Yes |
|
|
Custom Reference Mark |
Yes |
|
|
Custom Separator |
Yes |
|
|
Continuation Separator Mark |
Yes |
|
|
Document Wide Properties |
Yes |
|
|
Section Wide Properties |
Yes |
|
|
Number Format |
Yes |
|
|
Restart Location |
Yes |
|
|
Starting Value |
Yes |
|
|
Placement |
Yes |
|
· FootnoteOptions.Location |
Feature |
Supported |
Comment |
See Also |
Reference Mark |
Yes |
|
|
Custom Reference Mark |
Yes |
|
|
Custom Separator |
Yes |
|
|
Continuation Separator Mark |
Yes |
|
|
Document Wide Properties |
Yes |
|
|
Section Wide Properties |
Yes |
|
|
Number Format |
Yes |
|
· FootnoteOptions.NumberStyle |
Restart Location |
Yes |
|
· FootnoteOptions.RestartRule |
Starting Value |
Yes |
|
· FootnoteOptions.StartNumber |
Placement |
Yes |
|
|
Annonations allow the user to add extra information to the document normally for use in review or collaboration.
These features are supported by Aspose.Words.
Bookmarks are imported as BookmarkStart and BookmarkEnd nodes. In Microsoft Word document formats a bookmark range can span over long amoutns of content, including over different paragraphs and even tables.
In Aspose.Words the BookmarkStart node designates where the start of the bookmarked region begins in the document. Likewise, the BookmarkEnd node designates where the end of the bookmark region closes.
You can access the bookmark as a "single entity" by using the Bookmark façade. You can add and remove bookmarks from a document and also set and get the text of the bookmark content.
Bookmark nodes are represented as inline nodes (child of a paragraph). Some bookmarks markers in Word documents are at different levels of the document hierarchy than just inline. This means when they are imported into Aspose.Words they are translated to the cloesest inline position.
This normally causes no problems but some bookmarks on tables can appear differently when imported.
The Aspose.Words model is based on Word document formats. In these formats bookmark names must be unique. The model will allow bookmarks with the same name, however all duplicates are removed automatically during export. Note that duplicate bookmarks can happen when you accentitly create a bookmark with the same name, or when documents that contain the same bookmark are joined together using the AppendDocument or InsertDocument methods.
See the following links in the documentation for further information:
· Range.Bookmarks
· Bookmark
Feature |
Supported |
Comment |
See Also |
Bookmark Start |
Yes |
|
· BookmarkStart |
Bookmark End |
Yes |
|
· BookmarkEnd |
Bookmark Name |
Yes |
|
· Bookmark.Name |
Bookmark Table Columns |
Yes |
|
|
A comment in a document is imported as a Comment node in the Aspose.Words DOM.
The range of a comment can span over various parts of the document text, including over many paragraphs and tables.
In Aspose.Words this range is represented by the following nodes:
· Comment
· CommentRangeStart
· CommentRangeEnd
The CommentRangeStart and CommentRangeEnd nodes define the area of the document that the comment is applied to. The Comment node defines the actual content of the comment and provides members to access the comment properties such as Author and Time.
All three comment nodes are related through the use of the ID properties on each node.
See the following links in the documentation for further information:
· How to Extract or Remove Comments
· Comment
· Comment.Id
Feature |
Supported |
Comment |
See Also |
Comment |
Yes |
|
· Comment |
Comment Range |
Yes |
|
· CommentRangeStart · CommentRangeEnd |
Author |
Yes |
|
· Comment.Author |
Date |
Yes |
|
· Comment.Date |
Initial |
Yes |
|
· Comment.Inital |
Tracked changes are imported into the model as regular nodes. Paragraphs, Runs and Shapes all provide special properties to specify if they are insert or delete revisions.
You can work with each these revisions manually or choose to accept all revisions at once. There is currently no API to reject changes.
Using Aspose.Words you can set tracked changes to be on or off. Note however that any changes made in the DOM using Aspose.Words are not recorded as tracked changes.
You may need to accept tracked changes before saving to different formats or else the deleted revisions will still show up in the output document.
Most revision types properly round-tripped to the appropriate formats. Currently only Insert and Delete revisions are made avaliable in the public API. Also Move and some Table revisions are unsupported. Additionally formatting changes are also unsupported.
These additonal features will be included in a future version as well as an API to easily retrieve revisions by author, date etc.
See the following links in the documentation for further information:
· Document.HasRevisions
· Document.TrackRevisions
· Document.AcceptAllRevisions
Feature |
Supported |
Comment |
See Also |
On/Off State |
Yes |
|
|
Table Cell Deletion |
Planned |
|
|
Table Cell Insertion |
Planned |
|
|
Cell Merge or Split |
Planned |
|
|
Run Deletion |
Yes |
|
· Run.IsDeleteRevision |
Run Insertion |
Yes |
|
· Run.IsInsertRevision |
Paragraph Deletion |
Yes |
|
· Paragraph.IsDeleteRevision |
Paragraph Insertion |
Yes |
|
· Paragraph.IsInsertRevision |
Table Row Deletion |
Yes |
|
|
Table Row Insertion |
Yes |
|
|
Numbering Insertion |
Yes |
|
|
Numbering Change |
Yes |
|
|
Moves |
Planned |
|
|
Paragraph Properties Change |
Yes |
|
|
Run Properties Change |
Yes |
|
|
Section Properties Change |
Yes |
|
|
Table Properties Change |
Yes |
|
|
Cell Properties Change |
Yes |
|
|
Row Properties Change |
Yes |
|
|
RSIDs Session Identifiers |
Yes |
|
|
Fields are place holders in the document which can be dynamically updated to display new information . The most common type of fields are MergeFields and Page fields. The first allows you to merge data into a document, the latter displays the current page number of the page where the field appears on.
Aspose.Words supports almost all common field types and can peform field update on most field types, even ones with complex content. This includes the TOC (Table of Contents) field. With one call to Document.UpdateFields the TOC field or any other supported field is fully updated. New or existing fields are fully updated by the Aspose.Words field engine. There is a document option to control the culture/locale used during field update. This can be the language setting of the field in the document or the current culture/locale used by the application.
A field is represented in the document model as:
· FieldStart node.
· Run node(s) (represents the field code).
· FieldSeparator node.
· Other nodes (represents the field result) such as runs, shapes. A field can span across many different types of content. A field result can consist of other block level nodes such as Table or Paragraph.
· FieldEnd node.
We provide the Field facade for working with this structure more easily. This allows you to easily find the field code and field result of a field. Currently you can only retrieve this facade while inserting a new field into the document, there are plans to introduce a new field API which allows you to get this facade from any field the document.
Using Aspose.Words you can insert new fields, as well as find and modify existing fields. You can also remove fields. You can also find the field code and field result of any field.
Currently to work with a field you need to iterate through the different field nodes above. Sometime soon we will release the Field API which will provide an API to achieve such operations much more easily.
Fields with custom field codes or field results (modified manually in the document to appear different) are retained during import and export. However if you invoke field update, these might be replaced with the proper field content.
See the following links in the documentation for further information:
· DocumentBuilder.InsertField
· Document.UpdateFields
· FieldType
Feature |
Supported |
Comment |
See Also |
Field Codes |
Yes |
|
|
All Date and Time fields are supported and can be updated by Aspose.Words.
Feature |
Supported |
Comment |
See Also |
CreateDate |
Yes |
|
|
Date |
Yes |
|
|
EditTime |
Yes |
|
|
PrintDate |
Yes |
A document that has never been printed is displayed as the date "1/01/0001 1:00:00". This value of this field is not updated when the document is printed using Aspose.Words by calling the Document.Print method. |
|
SaveDate |
Yes |
This field is not updated with the current time when the document is saved by Aspose.Words using Document.Save. Rather any instance of this field in the document is updated with the correct time and date that the doucment was saved last in the editior. |
|
Time |
Yes |
|
|
All Document Automation fields are supported and can be updated by Aspose.Words.
Note that GotoButton, MacroButton and Print fields do not require any update.
Feature |
Supported |
Comment |
See Also |
Compare |
Yes |
|
|
DocVariable |
Yes |
|
|
GoToButton |
Yes |
|
|
If |
Yes |
Even complex conditions including nested fields such as formula fields or merge fields are evaluated correctly during field update. |
|
MacroButton |
Yes |
|
|
|
Yes |
|
|
All Document Automation fields are supported and can be updated by Aspose.Words with the exception of the "Info" fieldtype.
Note that GotoButton, MacroButton and Print fields do not require update.
Feature |
Supported |
Comment |
See Also |
Author |
Yes |
|
|
Comments |
Yes |
|
|
DocProperty |
Yes |
|
|
FileName |
Yes |
This field is updated as an empty string when document is loaded from stream. |
|
FileSize |
Yes |
This field is updated with "0" file length value when document is loaded from stream. |
|
Info |
Yes |
The contents of this field is supported upon open and save, however this field is not yet updated by the field engine. |
|
Keywords |
Yes |
|
|
LastSavedBy |
Yes |
|
|
NumChars |
Yes |
|
|
NumPages |
Yes |
|
|
NumWords |
Yes |
|
|
Subject |
Yes |
|
|
Template |
Yes |
This field is updated by the field engine. The attached file name is correctly updated, however the option to include the full path to the template name is not supported. |
|
Title |
Yes |
|
|
Feature |
Supported |
Comment |
See Also |
Formula |
Yes |
Field update is fully supported. References to bookmarks, cell references and special commands like ABOVE are also supported. |
|
Advance |
Yes |
Not yet supported during field update. |
|
Eq |
Yes |
Not yet supported by field update. Note that some equations inserted using the EQ field and edited in the Equation Editor in Microsoft Word are actually replaced with EMBED fields. |
|
Symbol |
Yes |
No update required. Field result is imported and exported correctly during document conversion. |
|
Form fields are fully supported by Aspose.Words.
See the following links in the documentation for further information:
· FormField
· FormField.Type
· FormField.Result
Feature |
Supported |
Comment |
See Also |
TextInput |
Yes |
|
· FormField.TextInputDefault · FormField.TextInputFormat |
CheckBox |
Yes |
|
· FormField.Type |
DropDown |
Yes |
|
· FormField.DropDownItems · FormField.DropDownSelectedIndex |
Calc On Exit |
Yes |
|
· FormField.CalculateOnExit |
Checked |
Yes |
|
· FormField.Checked |
Default Value |
Yes |
|
· FormField.TextInputDefault |
Enabled |
Yes |
|
· FormField.Enabled |
Entry and Exit Macro |
Yes |
|
· FormField.EntryMacro · FormField.ExitMacro |
Name |
Yes |
|
· FormField.Name |
Help Text |
Yes |
|
· FormField.HelpText |
Status Text |
Yes |
|
· FormField.StatusText |
Max Length |
Yes |
|
· FormField.MaxLength |
Check Box Size |
Yes |
|
· FormField.CheckboxSize · FormField.IsCheckBoxExactSize |
Text Input Type |
Yes |
|
· FormField.TextInputType |
Feature |
Supported |
Comment |
See Also |
Index |
Yes |
Not yet supported by field update. |
|
RD |
Yes |
To be supported by field update. |
|
TA |
Yes |
No update is required for this field. |
|
TC |
Yes |
No update is required for this field. |
|
TOA (Table of Authorities) |
Yes |
Not yet supported during field update. |
|
TOC (Table of Contents) |
Yes |
Table of Contents is fully supported in Aspose.Words. You can create a TOC from scratch and update it. The Aspose.Words field engine produces a TOC that looks just like how Microsoft Word does. The TOC can be generated from styles in the document and from TC fields. The following switches on the TOC field are supported: · Heading Styles (\O) · Outline Levels (\U) · Custom Styles (\T) · Bookmarked Content (\B) · Use TC Fields (\F and \L) · Omit Page Numbers (\N) · Insert As Hyperlinks (\H) · Set Separator Character (\P) · Preserve Tab Entries (\W) · Preserve New Line Entries (\X) All other switches will be supported in future versions. Currently mixed number formats in TOC is unsupported during field update and will appear as arabic numbering. This will be improved in a future version. These number formats are supported in other types of fields during update. Chapter numbeing is also unsupported at the moment. |
|
XE |
Yes |
This field does not require any update. |
|
Feature |
Supported |
Comment |
See Also |
AutoText |
Yes |
This field is not yet supported during field update. |
|
AutoTextList |
Yes |
This field is not yet supported during field update. |
|
Bibliography |
Yes |
This field is not yet supported during field update. |
|
Citation |
Yes |
This field is not yet supported during field update. |
|
Hyperlink |
Yes |
This field is fully supported. No update of this field is required. |
|
IncludePicture |
Yes |
This field is fully supported. No field update is required. You can access all of the properties of the IncludePicture field including the image and its source. |
· Shape.ImageData |
IncludeText |
Yes |
This field is supported. The field result of this field loaded from an existing document can be extracted and preserved during conversion. Updating this field is partially supported. Currently only Word document sources are supported at the moment. Support for TXT and other MIME types is planned. |
|
Link |
Yes |
Embedded objects are preserved and round-tripped correctly. However updating a linked object is currently unsupported. |
|
NoteRef |
Yes |
Currently is unsupported on field update. |
|
PageRef |
Yes |
This field is supported during field update. By default in Microsoft Word references re updated as letters. Currently in Aspose.Words these references are updated as digits. Hyperlinking, numeric format and paragraph position options are all supported during update. |
|
Quote |
Yes |
This field is updated and the appropriate symbol is inserted during field update. |
|
Ref |
Yes |
This field is supported during field update. Only some switches such as hyperlink and relative position are supported during field update. Support for the other options will be added in future versions. |
|
StyleRef |
Yes |
This field is supported during field update. Only a few switches are supported during field update. Support for the other options will be added in future versions. |
|
The mail merge engine allows you to quickly merge a variety of data into a document. You can merge simple data using simple mail merge as well as complex relational data from a database using merge regions. Both are easy to achieve using Aspose.Words.
Aspose.Words fully supports all of the mail merge features and fields with the exception of the following fields:
· Ask
· Database
· Fill-in
· SkipIf (consider using NextIf instead).
These fields will be supported in a later version of Aspose.Words. All other fields are supported.
See the following links in the documentation for further information:
· Document.MailMerge
· How to Use Advanced Mail Merge Features
Feature |
Supported |
Comment |
See Also |
AddressBlock |
Yes |
|
|
Ask |
Yes |
|
|
Compare |
Yes |
|
|
Database |
Yes |
|
|
Fill-in |
Yes |
|
|
GreetingLine |
Yes |
|
|
If |
Yes |
|
|
MergeField |
Yes |
|
|
MergeRec |
Yes |
|
|
MergeSeq |
Yes |
|
|
Next |
Yes |
|
|
NextIf |
Yes |
|
|
Set |
Yes |
|
|
SkipIf |
Yes |
|
|
Aspose.Words round-trips all of these fields properly. Aspose.Words supports updating the following fields:
· Page
· Section
· SectionPages
· Seq
Update of the other fields will be added to future versions.
Feature |
Supported |
Comment |
See Also |
AutoNum |
Yes |
|
|
AutoNumLgl |
Yes |
|
|
AutoNumOut |
Yes |
|
|
BarCode |
Yes |
Note that this only refers to the BarCode field structure. Commonly barcodes are actually represented in Microsoft Word document as text using a special barcode font or images. These types are fully supported during import. |
|
ListNum |
Yes |
|
|
Page |
Yes |
|
|
RevNum |
Yes |
|
|
Section |
Yes |
|
|
SectionPages |
Yes |
|
|
Seq |
Yes |
|
|
These fields are imported and round-tripped but currently are not updated by the field engine.
Feature |
Supported |
Comment |
See Also |
UserAddress |
Yes |
|
|
UserInitials |
Yes |
|
|
UserName |
Yes |
|
|
Aspose.Words fully supports all features of hyperlink fields.
You can create new hyperlinks by using the DocumentBuilder class. You can also find and edit hyperlinks inside the DOM and change the address of an existing hyperlink.
See the following links in the documentation for further information:
· DocumentBuilder.InsertHyperlink
· How to Replace or Modify Hyperlinks
Feature |
Supported |
Comment |
See Also |
Text |
Yes |
|
|
Hyperlinked Shape or Image |
Yes |
|
|
Hyperlink across Multiple Paragraphs |
Yes |
|
|
Hyperlink to a Local Bookmark |
Yes |
|
|
Hyperlink to an External Resource |
Yes |
|
|
Screen Tip |
Yes |
|
|
Target Frame |
Yes |
|
|
All formatting types are supported during field update or mail merge.
For example, when the MERGEFORMAT switch is used on a merge field, after mail merge, the text which replaces the merge field inherits the formatting. Fields with a "\@" date formatting switch are updated based on the date format supplied with the switch etc.
Feature |
Supported |
Comment |
See Also |
Date and Time Formatting |
Yes |
All date formats (pictures defined by the \@ tag, e.g \@ dd/MM/yyyy) are supported during update. Hijri, Lunar or Saka Era calender are not supported and are updated as regular Gregorian dates. |
|
Numbering Formatting |
Yes |
All number formats e.g \* Arabic, \* roman, \* hex etc are supported with the exception of Asian language formats. All numeric formats (using the \# switch, for example \# 0.00) are supported. |
|
General Formatting |
Yes |
All formatting to text, paragraphs etc are retained during field update. |
|
Aspose.Words supports many types of drawing entities on document load.
Graphic objects in any document format loaded into Aspose.Words are represented in the model by Shape nodes. If you are loading an OOXML document such as the DOCX format then you may have such content imported as a DrawingML node. Both node types provide similar members which allow you to access and modify both the image data and also the properties of the object such as positioning and behavior.
Using Aspose.Words you can create and modify different types of graphic objects.
Almost all properties that deal with object positioning use points as a unit of measurment. There is a class to help work with points by converting different types of units to and from points e.g pixel to point, point to inch.
You can insert new images of any type into a document by using the DocumentBuilder.InsertImage method or by setting the image of an existing shape using the Shape.ImageData property.
All of the following image types listed in the table below this overview are supported. When a document contains multiple references to the same image from an from an external address (e.g the internet) then the image is only downloaded once.
It is useful to know how images are stored in the model when you insert a new image using Aspose.Words There are three classes of image from the Aspose.Words point-of-view.
1. Microsoft Word Native (which can be stored directly in model without any changes). These are the JPEG, PNG, and PICT formats and are left untouched during insertion.
2. Windows Metafiles (can also be stored directly in the model). These are the EMF and WMF vector formats and are left untouched during insertion.
3. Microsoft Word Non-Native. These are not supported and have to be converted (to PNG) before being stored in the model. These are the GIF, TIFF and BMP formats.
Aspose.Words automatically converts the formats found in the third item if such a format is inserted into a document.
The reason why the formats found in the third item must be converted to PNG is because Microsoft Word formats don't support the GIF or TIFF formats. It makes sense to store these in memory in a format that is supported by Microsoft Word. Note that when you insert an image of these types in Microsoft Word it also converts them to PNG in the same way behind the scenes.
BMP is the exception and is supported by Microsoft Word. However, since a BMP stored in memory is often very large it too is converted to PNG to save memory.
Note that PNG is a lossless compression format, so there is no degregration of image quality using the above techniques.
If you are using Aspose.Words for Java you may need to ensure that you have the appropriate JAI image libraries installed in order for Aspose.Words to convert GIF, TIFF and BMP formats to PNG. If the required functionality is missing you may recieve a "Image type not supported" exception.
See the following links in the documentation for further information:
· Shape.IsImage
· LoadOptions.BaseUri
· Shape.ImageData
· ImageData.ImageType
· ConvertUtil
Feature |
Supported |
Comment |
See Also |
PNG |
Yes |
|
|
JPG |
Yes |
|
|
WMF |
Yes |
|
|
EMF |
Yes |
|
|
EMF+ |
Yes |
|
|
BMP |
Yes |
|
|
GIF |
Yes |
|
|
TIFF |
Yes |
|
|
Borders |
Yes |
|
· ImageData.Borders |
Cropping |
Yes |
|
· ImageData.CropLeft · ImageData.CropRight · ImageData.CropTop · ImageData.CropBottom |
Alternative text |
Yes |
|
· Shape.AltText |
Feature |
Supported |
Comment |
See Also |
Brightness |
Yes |
|
· ImageData.Brightness |
Contrast |
Yes |
|
· ImageData.Contrast |
Recolor |
Yes |
|
|
See the following link in the documentation for further information:
· Shape.TextBox
Feature |
Supported |
Comment |
See Also |
Text Direction |
Yes |
|
· TextBox.LayoutFlow |
Linked Textboxes |
Yes |
Linked text boxes are supported in Aspose.Words model, however there is currently no API to access or modify these values. |
|
Internal Margins |
Yes |
|
· TextBox.InternalMarginLeft · TextBox.InternalMarginRight · TextBox.InternalMarginTop · TextBox.InternalMarginBottom |
Vertical Alignment |
Yes |
|
|
Resize To Fit Text |
Yes |
|
· TextBox.FitShapeToText |
Text in Other Shapes |
Yes |
|
|
OLE Objects represent embedded content in a Microsoft Word document, such as an embedded Excel or Powerpoint document. The OLE object is dynamic and can be edited or updated through Microsoft Word. This feature is fully supported and preserved during document conversion.
OLE data can be accessed and modified through properties of the Shape class. You can extract and save OLE data to stream or disk.
Currently embedding new or updating existing OLE Objects is not supported in Aspose.Words.
See the following links in the documentation for further information:
· Shape.OleFormat
· OleFormat.Save
Feature |
Supported |
Comment |
See Also |
Linked |
Yes |
Note that Aspose.Words cannot update an OLE link. However you can modify a link only OLE object to point to a new location which can provide a partial way of changing OLE objects. When such a document is saved and opened in Microsoft Word it will detect the change in link and prompt the user to update the linked object. This results in the linked object appearing in the document. Such a tecnhique will only work for Word formats and if the document is opened in an editor which allows to update OLE objects (such as Microsoft Word). If the link is changed and the document to a different format such as PDF then the original content will still appear in the output. |
· OleFormat.IsLink · OleFormat.SourceFullName |
Embedded |
Yes |
|
|
Draw Aspect |
Yes |
|
|
Auto Update |
Yes |
|
· OleFormat.AutoUpdate |
Lock |
Yes |
|
· OleFormat.IsLocked |
Ole Object Data |
Yes |
|
· OleFormat.GetOleEntry · OleFormat.Save |
Ole Object Picture |
Yes |
|
· OleFormat.OleIcon |
Source Range |
Yes |
|
· OleFormat.SourceItem |
ActiveX Controls are preserved and supported during import. ActiveX is normally imported as a Shape node. Some ActiveX may also have an assosicated field.
You currently cannot create or modify existing ActiveX controls in a
document. You can however retrieve certain parts of data from controls (mostly parts assosicated with the graphic of the control).
Feature |
Supported |
Comment |
See Also |
Persistent Properties Storage |
Yes |
|
|
Aspose.Words supports almost all Shape and Image elements. References to external images such as ones on the internet are automatically downloaded as well. All of these elements are imported into Aspose.Words as Shape nodes.
Using Aspose.Words you can create any type of new shape including images, AutoShapes etc. you can also access, modify and remove such elements from a document.
Most common properties such as borders or position can be modified through the API. There is currently no API for modifying advanced shape properties e.g ArcSize of a RoundRectangle.
There is also no API for creating or modifiying advanced features such as Diagrams, Ink Annotations or Charts. These elements are retained fully during conversion.
Shapes which are linked to external resources such as images on the internet can be automatically downloaded when required.
See the following links in the documentation for further information:
· Shape
· Shape.ShapeType
· Shape.IsTopLevel
Feature |
Supported |
Comment |
See Also |
Lines |
Yes |
|
|
Basic Shapes |
Yes |
|
|
Block Arrows |
Yes |
|
|
Flowcharts |
Yes |
|
|
Callouts |
Yes |
|
|
Stars and Banners |
Yes |
|
|
Group Shape |
Yes |
|
· GroupShape · Shape.IsGroup |
Drawing Canvas |
Yes |
|
|
Signature Line |
Planned |
Signature line content is currently preserved in image form only. You cannot access or validate the digital signature attached to a signature line yet or extract the signature as plain text. Creating new signature lines is currently unsupported. These features will be included as soon as possible. |
· Shape.ImageData |
Ink Annotation |
Yes |
|
|
Clip Art |
Yes |
|
|
Diagrams (VML) |
Yes |
VML graphics format is normally used in pre-OOXML formats such as DOC or RTF. |
|
SmartArt (VML) |
Yes |
Represented as a groupshape with child shapes representing the different elements. You can add, modify or remove parts of the smart art. You can also extract the plain text content. |
|
Charts (VML) |
Yes |
Currently there is no API for accessing or modifying the content of a chart. You cannot retrieve the text of a chart. |
|
Shape Customizations |
Yes |
|
|
Hyperlink on Shape |
Yes |
|
· Shape.HRef |
Watermark |
Yes |
A watermark in a Microsoft Word document is actually a text shape or image centered in the middle of the page but in the header or footer. This allows the watermark to appear behind all content and as faded. |
DrawingML is the main graphics format used in OOXML documents such as DOCX. This format is supported in Aspose.Words. DrawingML features are often referred to as an "OOXML feature" e.g OOXML Charts.
Aspose.Words provides the DrawingML node which represents a DrawingML object in document. Currently you can extract/change DrawingML images and retrieve basic properties such as alternative text. You can also set the size of the object. You cannot create new DrawingML objects yet.
Further properties of DrawingML will be made avaliable. Currently there is no way to access child elements of complex objects such as Diagram and Charts.
You currently cannot retrieve the text content of a DrawingML object such as SmartArt.
Being able to create new DrawingML objects such as SmartArt or Charts is planned.
See the following link in the documentation for further information:
· DrawingML
Feature |
Supported |
Comment |
See Also |
Images/Shapes |
Yes |
|
· DrawingML.HasImage · DrawingML.ImageData |
Diagrams |
Yes |
|
|
SmartArt |
Yes |
|
|
Charts |
Yes |
|
|
WordArt is imported as a Shape object in Aspose.Words. This class provides properties to extract and modify properties of a WordArt object.
Using Aspose.Words you can create new WordArt graphics. Note that not all WordArt features are avalible through the API.
See the following links in the documentation for further information:
· Shape.IsWordArt
· Shape.TextPath
Feature |
Supported |
Comment |
See Also |
Styles |
Yes |
|
|
Outline |
Yes |
|
|
Fill |
Yes |
|
|
3D Properties |
Yes |
|
|
Text Spacing |
Yes |
|
· TextBox.Spacing |
Vertical Text |
Yes |
|
· TextBox.TextPathAlignment |
Even Height |
Yes |
|
· TextPath.SameLetterHeight |
Align and Justify Text |
Yes |
|
· Textbox.TextPathAlignment |
WordArt Shape |
Yes |
|
|
Horizontal Line Objects are represented as a Shape node in Aspose.Words. Since a Shape can also represent an image there is a property which returns if this shape is a Horizontal Line Object.
Using Aspose.Words you can create new or modify existing Horizontal Rule objects.
See the following link in the documentation for further information:
· Shape.IsHorizontalRule
Feature |
Supported |
Comment |
See Also |
Width |
Yes |
Width appears in the API only as absoloute points and not as percent as what Horizontal Line widths are normally calcuated in.The percent value can be calculated by using the width of the page. |
· Shape.Width |
Height |
Yes |
|
· Shape.Height |
Color |
Yes |
|
· Shape.FillColor |
Alignment |
Yes |
|
· Shape.HorizontalAlignment |
Hyperlink |
Yes |
|
· Shape.HRef |
Image |
Yes |
|
· Shape.HRef |
Aspose.Words supports creating objects with a variety of different positioning settings. Almost all possible settings are supported in the Aspose.Words model
You can also access and modify existing shape's positioning.
See the following links in the documentation for further information:
· Shape.Top
· Shape.Width
Feature |
Supported |
Comment |
See Also |
Inline |
Yes |
|
· Shape.IsInline |
Floating |
Yes |
In a Word document floating content is anchored to a paragraph. When a document is loaded into Aspose.Words this anchor is represented by the position of the Shape node in relation to Paragraph and the Runs of text. |
|
Wrap Type |
Yes |
|
· Shape.WrapType |
Wrap Sides |
Yes |
|
· Shape.WrapSide |
Distance from Text |
Yes |
|
· Shape.DistanceFromTextTop · Shape.DistanceFromTextBottom · Shape.DistanceFromTextLeft · Shape.DistanceFromTextRight |
Z-Order |
Yes |
|
· Shape.ZOrder |
Polygon Wrap Points |
Planned |
This property is currently lost upon import of Word documents. This feature will be included a future verison. |
|
Rotation |
Yes |
|
· Shape.Rotation |
Flip |
Yes |
|
· Shape.FlipOrientation |
Horizontal Alignment |
Yes |
|
· Shape.HorizontalAlignment |
Horizontal Position Relative To |
Yes |
|
· Shape.RelativeHorizontalPosition |
Vertical Alignment |
Yes |
|
· Shape.VerticalAlignment |
Vertical Position Relative To |
Yes |
|
· Shape.RelativeVerticalPosition |
Anchor Lock |
Yes |
|
· Shape.AnchorLocked |
Allow Overlap |
Yes |
|
· Shape.AllowOverlap |
Layout in Table Cell |
Yes |
There is currently no API to access this shape setting. |
|
Feature |
Supported |
Comment |
See Also |
Width and Height |
Yes |
|
· Shape.Width · Shape.Height |
Scale |
Yes |
There is currently no way to access scale of Shape loaded in Aspose.Words. The size of the shape after scale is applied is calculated and stored as the public size of the Shape. This size can be found using the Shape class. |
· Shape.SizeInPoints |
Relative Size |
Yes |
|
|
Lock Aspect Ratio |
Yes |
|
|
Using Aspose.Words you can access, modify and remove most fill properties of a shape.
See the following link in the documentation for further information:
· Shape.Fill
Feature |
Supported |
Comment |
See Also |
No Fill |
Yes |
|
· Shape.Filled |
Solid Fill |
Yes |
|
· Shape.FillColor |
Gradient Fill |
Yes |
There is currently no API for accessing or modifying the graident fill of a shape. |
|
Pattern Fill |
Yes |
The raw bytes of the Pattern fill can be extracted only. A new pattern can not be set. |
· Fill.ImageBytes |
Picture or Texture Fill |
Yes |
The raw bytes of the Texture fill can be extracted only. A new texture or image can not be set. |
· Fill.ImageBytes |
See the following links in the documentation for further information:
· Shape.Stroke
· Shape.Stroked
Feature |
Supported |
Comment |
See Also |
Line Color |
Yes |
|
· Stroke.Color · Stroke.Color2 |
Line Fill |
Yes |
|
· Stroke.ImageBytes |
Line Width |
Yes |
|
· Stroke.Weight |
Compound Type |
Yes |
|
· Stroke.LineStyle |
Dash Type |
Yes |
|
· Stroke.DashStyle |
Cap Type |
Yes |
|
· Stroke.Cap |
Join Type |
Yes |
|
· Stroke.JoinStyle |
Arrow Settings |
Yes |
|
· Stroke.StartArrowLength · Stroke.StartArrowType · Stroke.EndArrowLength · Stroke.EndArrowType |
Most shadow properties are preserved during import. There is currently no API to access shadow data of a graphic object.
This will be added in a future version.
Feature |
Supported |
Comment |
See Also |
Shadow |
Yes |
|
|
Most 3D properties are retained during import. There is currently no API to access or modify these properties on graphic objects.
This will be added in a future version.
Feature |
Supported |
Comment |
See Also |
3D Properties |
Yes |
|
|