New to Telerik Document ProcessingStart a free 30-day trial

Settings

Updated on Jun 3, 2026

TextFormatProvider exports a RadFixedDocument to plain text. The export settings provide options to customize the output.

Through the TextFormatProviderSettings class you can specify the following export settings:

PropertyDescription
LinesSeparatorDetermines the string used to separate the lines in the document. The default value is Environment.NewLine.
PagesSeparatorDetermines the string used to separate the pages in the document. The default value is "----------- Page{0} ------------".

Create TextFormatProviderSettings

The constructor of the TextFormatProviderSettings class has two overloads:

ConstructorDescription
TextFormatProviderSettings()Initializes a new instance of the class and sets the default values for its properties.
TextFormatProviderSettings(string linesSeparator, string pagesSeparator)Initializes a new instance of the class and sets the specified values for its properties.

Example 1 shows how to create and specify a particular setting.

Example 1: Create TextFormatProviderSettings

C#
TextFormatProviderSettings settings = new TextFormatProviderSettings("/r/n", "*Page {0}*");

Using TextFormatProviderSettings

The Export() method of TextFormatProvider accepts a TextFormatProviderSettings instance. Example 2 shows how to apply the settings created in Example 1 when exporting a RadFixedDocument to a string.

Example 2: Apply TextFormatProviderSettings

C#
RadFixedDocument document = new RadFixedDocument();

TextFormatProvider provider = new TextFormatProvider();
//string text = provider.Export(document, settings); // Obsolete since Q4 2025 
string text = provider.Export(document, settings, TimeSpan.FromSeconds(10));

See Also