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

RtfDocumentExporterOptions.ExportFinalParagraphMark Property

Enables you to add the ‘\par’ tag to the end of RTF content.

Namespace: DevExpress.XtraRichEdit.Export

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

[DefaultValue(ExportFinalParagraphMark.Always)]
public ExportFinalParagraphMark ExportFinalParagraphMark { get; set; }

#Property Value

Type Default Description
ExportFinalParagraphMark Always

An ExportFinalParagraphMark enumeration member.

Available values:

Name Description
Always

Always adds the ‘\par’ tag to the end of exported RTF content.

Never

Never adds the ‘\par’ tag to the end of exported RTF content.

SelectedOnly

Adds the ‘\par’ tag to the end of exported RTF content if the last character in the selection being exported is the carriage return.

#Property Paths

You can access this nested property as listed below:

Object Type Path to ExportFinalParagraphMark
RichEditDocumentExportOptions
.Rtf .ExportFinalParagraphMark

#Remarks

If the last character of the selected range passed to the SubDocument.GetRtfText method is a carriage return, the resulting RTF text is misinterpreted by the SubDocument.InsertRtfText method so that this carriage return is lost.

To remedy the situation, use the ExportFinalParagraphMark option.

The ExportFinalParagraphMark option allows you to specify whether the \par tag should be added. To include the tag only if the selection contains the final paragraph mark, set the option to the ExportFinalParagraphMark.SelectedOnly value.

See Also