Skip to main content

ASPxRichEdit.SaveCopy(Stream, DocumentFormat) Method

Saves a copy of the active document in the specified format to a stream.

Namespace: DevExpress.Web.ASPxRichEdit

Assembly: DevExpress.Web.ASPxRichEdit.v23.1.dll

NuGet Package: DevExpress.Web.Office


public void SaveCopy(
    Stream stream,
    DocumentFormat format


Name Type Description
stream Stream

A stream object where to save the document.

format DocumentFormat

The document format.


Use the SaveCopy method to save a copy of the active document to a stream in the specified format. This method exports the document with the current changes, but do not affect the original document state (it does not initiate document synchronization, does not apply client changes to the document model, etc.).

using DevExpress.Web.Office;

using (MemoryStream documentContentAsStream = new MemoryStream()) {
  ASPxRichEdit1.SaveCopy(documentContentAsStream, DocumentFormat.Rtf);
  // Your custom logic to save a document to a custom storage
See Also