New to Telerik Document ProcessingStart a free 30-day trial

Using TextFormatProvider

Updated on Feb 19, 2026

TextFormatProvider makes it easy to export RadFixedDocument to plain text format, preserving the document structure.

All you have to do in order to use TextFormatProvider is add references to the packages listed below:

  • Telerik.Windows.Documents.Core
  • Telerik.Windows.Documents.Fixed

Export

In order to export a document to plain text, you need to use the Export() method of TextFormatProvider.

Example 1 shows how to use TextFormatProvider to export RadFixedDocument to a string.

Example 1: Export RadFixedDocument to string

c#
Telerik.Windows.Documents.Fixed.FormatProviders.Text.TextFormatProvider textFormatProvider =
    new Telerik.Windows.Documents.Fixed.FormatProviders.Text.TextFormatProvider();

RadFixedDocument document = new RadFixedDocument();
using (RadFixedDocumentEditor radFixedDocumentEditor = new RadFixedDocumentEditor(document))
{
    radFixedDocumentEditor.InsertLine("Sample line.");
    radFixedDocumentEditor.InsertRun("Sample run.");
}

string documentAsText = textFormatProvider.Export(document, TextFormatProviderSettings.Default);

See Also

In this article
ExportSee Also
Not finding the help you need?
Contact Support