# Using TextFormatProvider

`TextFormatProvider` exports a `RadFixedDocument` to plain text format while preserving the document structure.

To use `TextFormatProvider`, add references to the following packages:

* Telerik.Windows.Documents.Core
* Telerik.Windows.Documents.Fixed

## Export

To export a document to plain text, use the `Export()` method of `TextFormatProvider`.

The following example shows how to use `TextFormatProvider` to export a `RadFixedDocument` to a string.

**Export RadFixedDocument to string**

```C#
Telerik.Documents.Fixed.FormatProviders.Text.TextFormatProvider textFormatProvider =
    new Telerik.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, TimeSpan.FromSeconds(10));
```

## See Also

* [Plain Text Format Overview](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/plain-text/text)
* [TextFormatProvider Settings](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/plain-text/settings)
* [Timeout Mechanism](https://www.telerik.com/document-processing-libraries/documentation/knowledge-base/timeout-mechanism-in-dpl)
* [Extracting Text from PDF Documents](https://www.telerik.com/document-processing-libraries/documentation/knowledge-base/extract-text-from-pdf)
* [Summarizing PDF Text Content with Azure AI Text Analytics](https://www.telerik.com/document-processing-libraries/documentation/knowledge-base/summarize-pdf-content)
* [Automatic Output Stream Clearing on Export](https://www.telerik.com/document-processing-libraries/documentation/common-information/clear-output-stream-on-export)
