Obtains information on the formatting capabilities required to export the current document correctly.
A DocumentExportCapabilities object, representing information on the formatting capabilities required to correctly format the current document.
In order to check whether the document can be correctly exported to various formats, you can get the information about formatting features applied to the document. The RequiredExportCapabilities property provides access to a structure which indicates if non-default character formatting, paragraph formatting, inline pictures or objects etc. are contained within the document. Use its properties, such as the DocumentExportCapabilities.ParagraphFormatting, DocumentExportCapabilities.Sections and others, or the DocumentExportCapabilities.Contains method to compare the export method capabilities with the document features which should be supported, to ensure the correct result.
The following code snippet illustrates how you can detect if the capabilities of your custom exporter match the formatting capabilities required to export the current document. First, declare the exporter capabilities in the DocumentExportCapabilities structure, and then compare it with the structure obtained via the Document.RequiredExportCapabilities property.
DevExpress.XtraRichEdit.DocumentExportCapabilities myExportFeatures = new DevExpress.XtraRichEdit.DocumentExportCapabilities(); myExportFeatures.CharacterFormatting = true; myExportFeatures.ParagraphFormatting = true; myExportFeatures.InlinePictures= true; if(myExportFeatures.Contains(richEditControl1.Document.RequiredExportCapabilities)) MessageBox.Show("The document can be exported");