Represents a document.
Inheritance Hierarchy
GemBox.Document Element
GemBox.Document DocumentModel
Namespace: GemBox.Document
Assembly: GemBox.Document (in GemBox.Document.dll) Version: 21.3.30.1113
Syntax
public sealed class DocumentModel : Element, IContentElement
Remarks
DocumentModel is a central class in GemBox.Document component. It is an in-memory representation of a document file.
Document content can be retrieved through DocumentModel.Sections property. For more information, see content model.
To load / read a document from a file or a stream, use static Load Overload methods. To preserve unsupported file format features, set PreserveUnsupportedFeatures to . For more information, see preservation.
To save / write a document to a file or a stream use Save Overload methods. For more information, see supported file formats.
DocumentModel contains also following members:
- DocumentModel.DefaultParagraphFormat and DocumentModel.DefaultCharacterFormat - represent formatting properties for paragraphs and text that do not have any direct, inherited or style-based formatting.
- DocumentModel.Styles - a collection of all Styles in the document. For more information, see formattings and styles.
- DocumentModel.Bookmarks - a collection of all Bookmarks in the document.
- DocumentModel.MailMerge - used for importing .NET objects into the document. For more information, see mail merge.
- DocumentModel.DocumentProperties - a dictionaries of built-in and custom document properties.
- DocumentModel.ViewOptions - defines document view and zoom when document is viewed in an application such as Microsoft Word. See view options sample.
See Also