private void richEditControl1_BeforeExport(object sender, DevExpress.XtraRichEdit.BeforeExportEventArgs e) { DocumentExportCapabilities checkDocument = richEditControl1.Document.RequiredExportCapabilities; if ((e.DocumentFormat == DocumentFormat.Rtf) && checkDocument.InlinePictures) { DialogResult reduceFileSize = MessageBox.Show("This document contains inline pictures.\n" + "You can embed the same picture in two different types (original and Windows Metafile) for better compatibility" + " although it increases the file size. By default a picture is saved in original format only.\n" + "Enable dual picture format in a saved file?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); RtfDocumentExporterOptions options = e.Options as RtfDocumentExporterOptions; if (options != null) { switch (reduceFileSize) { case DialogResult.Yes: options.Compatibility.DuplicateObjectAsMetafile = true; break; case System.Windows.Forms.DialogResult.No: options.Compatibility.DuplicateObjectAsMetafile = false; break; } } } }
private void rchbody_BeforeExport(object sender, DevExpress.XtraRichEdit.BeforeExportEventArgs e) { RtfDocumentExporterOptions options = e.Options as RtfDocumentExporterOptions; if (options != null) { options.Compatibility.DuplicateObjectAsMetafile = false; } }