Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Document.RequiredExportCapabilities Property

Obtains information on the formatting capabilities required to export the current document correctly.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

DocumentExportCapabilities RequiredExportCapabilities { get; }

#Property Value

Type Description
DocumentExportCapabilities

A DocumentExportCapabilities object, representing information on the formatting capabilities required to correctly format the current document.

#Remarks

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");
See Also