New to Telerik Document Processing? Start a free 30-day trial
Settings
Updated on May 11, 2026
TextFormatProvider allows you export a RadFixedDocument to plain text. Additionally, the export settings provide modification options. This article outlines the available settings.
Through the TextFormatProviderSettings class you could specify the following export settings:
| Property | Description |
|---|---|
LinesSeparator | Determines the string used to separate the lines in the document. The default value is Environment.NewLine. |
PagesSeparator | Determines 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:
| Constructor | Description |
|---|---|
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 allows you to pass a TextFormatProviderSettings instance. Example 2 illustrates how to apply the settings created in Example 1, when exporting a RadFixedDocument to 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));