Back to Devexpress

IRichEditDocumentServer.BeforeExport Event

officefileapi-devexpress-dot-xtrarichedit-dot-iricheditdocumentserver-3488442c.md

latest3.0 KB
Original Source

IRichEditDocumentServer.BeforeExport Event

Occurs before the document is saved (exported to a certain format).

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
event BeforeExportEventHandler BeforeExport
vb
Event BeforeExport As BeforeExportEventHandler

Event Data

The BeforeExport event's data class is BeforeExportEventArgs. The following properties provide information specific to this event:

PropertyDescription
CustomPropertiesProvides access to the document’s custom properties.
DocumentFormatGets the format of the document being exported or saved.
OptionsProvides access to the exporter options.

Remarks

You can check the Document.RequiredExportCapabilities to be sure that the chosen export format supports them.

The BeforeExport event enables you to adjust the exporter options as required.

For RTF format, you can specify the RtfDocumentExporterCompatibilityOptions.DuplicateObjectAsMetafile property to make resulting files smaller. For the HTML format, you can set the location of external content (images, css files) via the IExporterOptions.TargetUri property and specify other HtmlDocumentExporterOptions.

See Also

SaveDocument(Stream, DocumentFormat)

RequiredExportCapabilities

DocumentSaveOptions

SaveDocument

IRichEditDocumentServer Interface

IRichEditDocumentServer Members

DevExpress.XtraRichEdit Namespace