Namespace: Spire.Doc
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 9.6.1.0 (9.6.1.3020)
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 9.6.1.0 (9.6.1.3020)
Syntax
| C# | Visual Basic | Visual C++ | F# |
public class Document : DocumentContainer, IDocument, ICompositeObject, IDocumentObject, IXmlSerializable, [T:sprᧁ], [T:sprᧀ], IDisposable
Public Class Document Inherits DocumentContainer Implements IDocument, ICompositeObject, IDocumentObject, IXmlSerializable, [T:sprᧁ], [T:sprᧀ], IDisposable
public ref class Document : public DocumentContainer, IDocument, ICompositeObject, IDocumentObject, IXmlSerializable, [T:sprᧁ], [T:sprᧀ], IDisposable
type Document = class inherit DocumentContainer interface IDocument interface ICompositeObject interface IDocumentObject interface IXmlSerializable interface [T:sprᧁ] interface [T:sprᧀ] interface IDisposable end
Members
| All Members | Constructors | Fields | Properties | Methods | Events |
| Member | Description | |
|---|---|---|
| Document()()()() | Initializes a new instance of the Document class | |
| Document(Stream) | Initializes a new instance of the Document class | |
| Document(String) | Initializes a new instance of the Document class | |
| Document(Document) | Initializes a new instance of the Document class | |
| Document(Stream, FileFormat) | Initializes a new instance of the Document class | |
| Document(Stream, String) | Initializes a new instance of the Document class | |
| Document(String, FileFormat) | Initializes a new instance of the Document class | |
| Document(String, String) | Initializes a new instance of the Document class | |
| Document(Stream, FileFormat, XHTMLValidationType) | Initializes a new instance of the Document class | |
| Document(Stream, FileFormat, String) | Initializes a new instance of the Document class | |
| Document(String, FileFormat, XHTMLValidationType) | Initializes a new instance of the Document class | |
| Document(String, FileFormat, String) | Initializes a new instance of the Document class | |
| AcceptChanges()()()() |
Accepts changes tracked from the moment of last change acceptance.
| |
| AddListStyle(ListType, String) |
Adds new list style to document.
| |
| AddParagraphStyle(String) |
Adds new paragraph style to the document.
| |
| AddSection()()()() |
Adds new section to document.
| |
| AddStyle(BuiltinStyle) |
Adds the style to the document style.
| |
| Background |
Gets document's background
| |
| BookmarkLayout |
Occurs when draw a bookmark.
| |
| Bookmarks |
Gets document bookmarks.
| |
| BuiltinDocumentProperties |
Gets document built-in properties object.
| |
| ChildObjects |
Gets the child entities.
(Overrides DocumentObject..::..ChildObjects.) | |
| ClearMacros()()()() |
Removes the macros from the document.
| |
| Clone()()()() |
Clones itself.
| |
| CloneCompatibilityTo(Document) |
Clones the current document compatibility to the destination document.
| |
| CloneDefaultStyleTo(Document) |
Clones the current document default style to the destination document.
| |
| CloneImpl()()()() | (Overrides DocumentSerializable..::..CloneImpl()()()().) | |
| CloneThemesTo(Document) |
Clones the current document theme style to the destination document.
| |
| CloneWebSettingsTo(Document) |
clone Websettings to other document
| |
| Close()()()() |
Closes this instance.
| |
| Comments |
Gets comments item of the document.
| |
| Compare(Document, String) |
Compares this document with another document.
| |
| Compare(Document, String, DateTime) |
Compares this document with another document.
| |
| Count |
Gets count of child object.
(Inherited from DocumentContainer.) | |
| CreateCellFormatImpl()()()() | ||
| CreateCharacterFormatImpl()()()() | ||
| CreateLayoutInfo()()()() | (Overrides DocumentBase..::..CreateLayoutInfo()()()().) | |
| CreateListFormatImpl(IParagraph) | ||
| CreateListLevelImpl(ListStyle) | ||
| CreateListStyleImpl()()()() | ||
| CreateMinialDocument()()()() |
Create a minial document, one empty section to the document and one empty paragraph to created section.
| |
| CreateParagraph()()()() |
Creates the paragraph.
| |
| CreateParagraphFormatImpl()()()() | ||
| CreateParagraphItem(ParagraphItemType) |
Creates new paragraph item instance.
| |
| CreateTableFormatImpl()()()() | ||
| CreateTextBoxCollectionImpl()()()() | ||
| CreateTextboxFormatImpl()()()() | ||
| CustomDocumentProperties |
Gets document custom properties object.
| |
| DetectedFormatType |
Returns the detected format type of the document which was loaded. .
| |
| Dispose()()()() |
Prerforms application-defined tasks associated with freeing,releasing, or
resetting unmanaged resources.
| |
| Document |
Gets the document.
(Inherited from OwnerHolder.) | |
| DocumentObjectType |
Gets the type of the document object.
(Overrides DocumentObject..::..DocumentObjectType.) | |
| EmbedFontsInFile |
Gets or sets a value indicating whether save fonts that are used in the document in the file.
Only support for the DOCX file format.
| |
| EmbedSystemFonts |
Gets or sets a value indicating whether save system fonts that are used in the document in the file.
| |
| Encrypt(String) |
Encrypts the document.
| |
| EndnoteOptions |
Gets or sets options that control numbering and positioning of endnotes in this document.
| |
| Endnotes |
Gets document endnotes.
| |
| Equals(Object) | (Inherited from Object.) | |
| Fields |
Gets fields of the documnet.
| |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| FindAllPattern(Regex) |
Returns all entries of matchString regex.
| |
| FindAllString(String, Boolean, Boolean) |
Returns all entries of matchString string, taking into consideration caseSensitive
and wholeWord options.
| |
| FindPattern(Regex) |
Finds and returns entry of specified regular expression along with formatting.
| |
| FindPattern(BodyRegion, Regex) |
Finds the next entry of matchString pattern.
| |
| FindPatternInLine(Regex) |
Finds the first entry of specified pattern in single-line mode.
| |
| FindPatternInLine(BodyRegion, Regex) |
Finds the text which fit the specified pattern starting from start.
using single-line mode.
| |
| FindString(String, Boolean, Boolean) |
Finds and returns string along with formatting.
| |
| FindString(BodyRegion, String, Boolean, Boolean) |
Finds the next entry of matchString string, taking into consideration caseSensitive
and wholeWord options.
| |
| FindStringInLine(String, Boolean, Boolean) |
Finds the first entry of matchString text in single-line mode.
| |
| FindStringInLine(BodyRegion, String, Boolean, Boolean) |
Finds the next matchString text starting from specified using single-line mode.
| |
| FirstChild | (Inherited from DocumentObject.) | |
| FootnoteOptions |
Gets or sets options that control numbering and positioning of footnotes in this document.
| |
| Footnotes |
Gets document footnotes.
| |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetIndex(IDocumentObject) | (Inherited from DocumentContainer.) | |
| GetNextWidgetSibling()()()() | (Inherited from DocumentObject.) | |
| GetPageCount()()()() |
Gets total number of pages for document.
| |
| GetPreviousWidgetSibling()()()() | (Inherited from DocumentObject.) | |
| GetSchema()()()() | ||
| GetText()()()() |
Gets the document's text.
| |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| HasChanges |
Gets a value indicating whether the document has tracked changes.
| |
| HtmlBaseUrl |
Gets or sets the Base path which is used to convert the relative path to absolute path.
| |
| HTMLCustomComment | Gets or sets a value specifying whether parsing and writing comment of document in HTML. Supported HTML Tag : span ,when the value of class attribute is comment Supported HTML Tag Attribytes : data-comment / data-user / data-cid / data-date. | |
| HtmlExportOptions |
Gets the save options.
| |
| HTMLIdentifierPunctuations |
Set the custom punctuation as sentence indentifier.
Full stop, qusetion mark, exclamatory mark are default values.
| |
| HTMLSentenceIdentifier | Gets or sets a value specifying whether to add identifier to a sentence when writing to HTML. Writed HTML Attribyte : sentence. Writed HTML Value Of Attribyte : start / end / (start,end). | |
| HTMLTrackChanges | Gets or sets a value specifying whether parsing and writing custom Change_Tracking HTML Tags are supported. Supported HTML Tag : insert / delete. Supported HTML Tag Attribytes : data-username / data-time. | |
| ImportContent(IDocument) |
Imports all content into the document.
| |
| ImportContent(IDocument, Boolean) |
Imports all content into document.
| |
| ImportSection(ISection) |
Imports section into document.
| |
| InitXDLSHolder()()()() | (Overrides DocumentSerializable..::..InitXDLSHolder()()()().) | |
| InsertTextFromFile(String, FileFormat) |
Insert text from a file.
| |
| InsertTextFromStream(Stream, FileFormat) |
Insert text from stream.
| |
| IsComposite |
Indicating whether this instance is composite.
(Inherited from DocumentObject.) | |
| IsContainMacro |
Indicates whether the document has macros.
| |
| IsUpdateFields |
Gets or sets a value indicating whether to update fields in the document.
| |
| JPEGQuality |
Gets/sets the quality (Q%) of the image of JPEG format, this property
is only used for doc to pdf. The default value is 80.
| |
| KeepSameFormat |
Gets or sets a value that indicates whether to keep same formatting when it is merged to other document.
| |
| LastChild | (Inherited from DocumentObject.) | |
| LastParagraph |
Gets last section object.
| |
| LastSection |
Gets last section of the document.
| |
| ListStyles |
Gets document list styles.
| |
| LoadFromFile(String) |
Opens doc file.
| |
| LoadFromFile(String, FileFormat) |
Opens the document from file in Xml or Microsoft Word format.
| |
| LoadFromFile(String, FileFormat, XHTMLValidationType) |
Opens the HTML document from stream .
| |
| LoadFromFile(String, FileFormat, String) |
Opens the document from file in Xml or Microsoft Word format.
| |
| LoadFromFileInReadMode(String, FileFormat) |
LoadFromStream new document in read-only mode.
| |
| LoadFromStream(Stream, FileFormat) |
Opens the document from stream in Xml or Microsoft Word format.
| |
| LoadFromStream(Stream, FileFormat, XHTMLValidationType) |
Opens the HTML document from stream .
| |
| LoadFromStream(Stream, FileFormat, String) |
Opens the document from stream in Xml or Microsoft Word format.
| |
| LoadHTML(TextReader, XHTMLValidationType) |
Load document in html format
| |
| LoadHTML(TextReader, String, XHTMLValidationType) |
Load document in html format
| |
| LoadRtf(Stream) |
Opens the rtf document from a stream.
| |
| LoadRtf(TextReader) |
Opens the rtf document with specified encoding from a reader.
| |
| LoadRtf(String) |
Opens the rtf document from a file.
| |
| LoadRtf(Stream, Encoding) |
Opens the rtf document with specified encoding from a stream.
| |
| LoadRtf(String, Encoding) |
Opens the rtf document with specified encoding from a file.
| |
| LoadText(Stream) |
Opens the text document from a stream with default encoding utf-8.
| |
| LoadText(TextReader) |
Opens the rtf document with specified encoding from a reader.
| |
| LoadText(String) |
Opens the text document from a file with default encoding utf-8.
| |
| LoadText(Stream, Encoding) |
Opens the text document with specified encoding from a stream.
| |
| LoadText(String, Encoding) |
Opens the text document with specified encoding from a file.
| |
| m_doc | (Inherited from OwnerHolder.) | |
| m_listStyles | ||
| m_sections | ||
| m_styles | ||
| MailMerge |
Gets mail merge engine.
| |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| NextSibling |
Gets the next sibling.
(Inherited from DocumentObject.) | |
| OnBeginPrint(Object, PrintEventArgs) | ||
| OnEndPrint(Object, PrintEventArgs) | ||
| OnPrintPage(Object, PrintPageEventArgs) | ||
| OnQueryPageSettings(Object, QueryPageSettingsEventArgs) | ||
| Owner |
Gets the owner of this entity.
(Inherited from DocumentObject.) | |
| PageCount |
Gets total number of pages for document.
| |
| PageLayout |
Occurs when creating a new page.
| |
| PreviousSibling |
Gets the previous sibling.
(Inherited from DocumentObject.) | |
| PrintDialog |
Set print parnameters
| |
| PrintDocument |
Gets the PrintDocument
| |
| PrivateFontList |
Gets the private font list.
| |
| Properties |
Gets the document properties.
| |
| Protect(ProtectionType) |
Protects the document.
| |
| Protect(ProtectionType, String) |
Protects the document.
| |
| ProtectionType |
Gets or sets the type of protection of the document.
| |
| QuiteMode |
Get / sets whether is quite mode.
| |
| ReadXmlAttributes(IXDLSAttributeReader) | (Overrides DocumentSerializable..::..ReadXmlAttributes(IXDLSAttributeReader).) | |
| ReadXmlContent(IXDLSContentReader) | (Overrides DocumentSerializable..::..ReadXmlContent(IXDLSContentReader).) | |
| RejectChanges()()()() |
Rejects changes tracked from the moment of last change acceptance.
| |
| RemoveEncryption()()()() |
Removes the encryption.
| |
| Replace(Regex, TextSelection) |
Replaces all entries of matchString regular expression with TextRangesHolder.
| |
| Replace(Regex, String) |
Replaces all entries of matchString regular expression with newValue string.
| |
| Replace(String, TextSelection, Boolean, Boolean) |
Replaces all entries of matchString string with TextSelection, taking into
consideration caseSensitive and wholeWord options.
| |
| Replace(String, IDocument, Boolean, Boolean) |
Replaces the specified matchString.
| |
| Replace(String, String, Boolean, Boolean) |
Replaces all entries of matchString string with newValue string, taking into
consideration caseSensitive and wholeWord options.
| |
| ReplaceFirst |
Gets or sets a value indicating whether need first replacing.
| |
| ReplaceInLine(Regex, TextSelection) |
Replaces the matchString pattern with matchSelection in single-line mode.
| |
| ReplaceInLine(Regex, String) |
Replaces all entries with specified pattern with newValue text in single-line mode.
| |
| ReplaceInLine(String, TextSelection, Boolean, Boolean) |
Replaces the matchString text with matchSelection in single-line mode.
| |
| ReplaceInLine(String, String, Boolean, Boolean) |
Replaces all entries of matchString text with newValue text in single-line mode.
| |
| ResetFindState()()()() |
Resets the FindPattern.
| |
| RestoreReference(String, Int32) | (Inherited from DocumentSerializable.) | |
| SaveToEpub(Stream, DocPicture) |
Saves the EPUB document.
| |
| SaveToEpub(String, DocPicture) |
Saves the EPUB document.
| |
| SaveToFile(String) |
Saves to file in Microsoft Word format.
| |
| SaveToFile(Stream, FileFormat) |
Saves the document into stream in Xml or Microsoft Word format.
| |
| SaveToFile(String, FileFormat) |
Saves the document to file in Xml or Microsoft Word format.
| |
| SaveToFile(String, ToPdfParameterList) |
Saves the document to PDF file.
| |
| SaveToFile(String, List<(Of <<'(String>)>>)) | Obsolete.
Embedding fonts to PDF document.
| |
| SaveToFile(String, FileFormat, array<Byte>[]()[][], String) |
Saves document to file and digitally sign, Only DOC and DOCX are supported.
| |
| SaveToFile(String, FileFormat, String, String) |
Saves document to file and digitally sign, Only DOC and DOCX are supported.
| |
| SaveToFile(String, FileFormat, HttpResponse, HttpContentType) |
Saves the specified file name.
| |
| SaveToImages(ImageType) |
Save the whole document into images
| |
| SaveToImages(Int32, ImageType) |
Save the specified page into image
| |
| SaveToImages(Int32, ImageFormat) |
Save the specified page into image
| |
| SaveToImages(Int32, Int32, ImageType) |
Save the specified range of pages into images
| |
| SaveToStream(Stream, FileFormat) |
Saves the document into stream in Xml or Microsoft Word format.
| |
| SaveToStream(Stream, ToPdfParameterList) |
Embedding fonts to PDF document.
| |
| SaveToStream(Stream, FileFormat, array<Byte>[]()[][], String) |
Saves document to stream and digitally sign, Only DOC and DOCX are supported.
| |
| SaveToStream(Stream, FileFormat, String, String) |
Saves document to stream and digitally sign, Only DOC and DOCX are supported.
| |
| SaveToSVG()()()() |
Saves the SVG.
| |
| SaveToSVG(String) |
Saves the SVG.
| |
| SaveToTxt(String, Encoding) |
Saves to text document with specified encoding.
| |
| Sections |
Gets document sections.
| |
| Sign(Stream, array<Byte>[]()[][], String) |
Create digitally signed word document.
Digital signature of documents support only DOC and DOCX formats.
| |
| Sign(Stream, String, String) |
Create digitally signed word document.
Digital signature of documents support only DOC and DOCX formats.
| |
| Styles |
Gets document styles.
| |
| TextBoxes |
Get/set textbox items of main document
| |
| TOC |
Gets or sets the TOC element of the word document.
| |
| ToString()()()() | (Inherited from Object.) | |
| ToString(String) |
Exports the name and index in container of the object into a string in the specified seperator.
(Inherited from DocumentObject.) | |
| TrackChanges |
Gets or sets a value indicating whether tracking changes is turn on.
| |
| UpdateFields |
Occurs when update field.
| |
| UpdateTableOfContents()()()() |
Update Table of contents in the document.
| |
| UpdateTableOfContents(TableOfContent) |
Update specified Table of content in the document.
| |
| UpdateWordCount()()()() |
Update Paragraphs count, Word count and Character count
| |
| UpdateWordCount(array<Char>[]()[][]) |
Update Paragraphs count, Word count and Character count.
| |
| UpdateWordCount(array<Char>[]()[][], Boolean) |
Update Paragraphs count, Word count and Character count.
| |
| Variables |
Gets or sets the document variables.
| |
| ViewSetup |
Gets view setup options in Microsoft word.
| |
| Watermark |
Gets or sets document's watermark.
| |
| WidgetCollection | (Overrides DocumentContainer..::..WidgetCollection.) | |
| WriteXmlAttributes(IXDLSAttributeWriter) | (Overrides DocumentSerializable..::..WriteXmlAttributes(IXDLSAttributeWriter).) | |
| WriteXmlContent(IXDLSContentWriter) | (Overrides DocumentSerializable..::..WriteXmlContent(IXDLSContentWriter).) | |
| XDLSHolder | (Inherited from DocumentSerializable.) | |
| XHTMLValidateOption |
Gets or sets the HTML validate option.the default value is None.
|
Inheritance Hierarchy
System..::..Object
Spire.Doc..::..OwnerHolder
Spire.Doc.Documents.XML..::..DocumentSerializable
Spire.Doc..::..DocumentObject
Spire.Doc..::..DocumentBase
Spire.Doc..::..DocumentContainer
Spire.Doc..::..Document
Spire.Doc..::..OwnerHolder
Spire.Doc.Documents.XML..::..DocumentSerializable
Spire.Doc..::..DocumentObject
Spire.Doc..::..DocumentBase
Spire.Doc..::..DocumentContainer
Spire.Doc..::..Document