RichEditDocumentServer.SaveDocument(DocumentFormat) Method
In This Article
Saves the document to a byte array in the specified file format.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
#Declaration
public byte[] SaveDocument(
DocumentFormat documentFormat
)
#Parameters
Name | Type | Description |
---|---|---|
document |
Document |
An enumeration member that specifies the output document format. |
#Returns
Type | Description |
---|---|
Byte[] | A byte array that contains data in the specified format. |
#Remarks
You can use this SaveDocument method overload to store a document in an external database.
using DevExpress.XtraRichEdit;
// ...
RichEditDocumentServer wordProcessor = new RichEditDocumentServer()
// Save a document to a byte array to store it in a database.
byte[] docBytes = wordProcessor.SaveDocument(DocumentFormat.OpenXml);
// ...
// Load the saved document from a byte array.
wordProcessor.LoadDocument(docBytes, DocumentFormat.OpenXml);
#Implements
See Also