Rtf To Text Class
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public class RtfToText : TextConverter- Inheritance
- Object TextConverter RtfToText
Remarks
Used to convert Rich Text Format (RTF) documents into plain text.
The converter implements the subset of the Rich Text Format (RTF) Specification, version 1.9.1, that affects the visible text of a document: character sets and code pages, Unicode escapes, paragraphs, line breaks, tabs, tables and special characters. Destinations that do not contain document text (such as pictures, embedded objects, style sheets and document properties) are skipped, as is hidden text. The attachment placeholders (\objattph) that Microsoft Outlook and Exchange write are reported to the AttachmentPlaceholderCallback.
The converter is designed to be resilient against hostile input. Its memory usage does not depend on the size of the input: font table, color table and group nesting resources are bounded by MaxFontTableEntries, MaxColorTableEntries and MaxGroupDepth, and embedded binary data (\binN) is skipped without being buffered.
Constructors
| RtfToText | Initialize a new instance of the RtfToText class. |
Properties
| AttachmentPlaceholderCallback | Get or set the RtfToTextAttachmentPlaceholderCallback method to use for rendering attachment placeholders. |
| ComplianceLogger | Get or set the logger to use for reporting RTF compliance violations. |
| ComplianceOptions | Get or set the options that control how RTF compliance violations are reported. |
| DetectEncodingFromByteOrderMark |
Get or set whether the encoding of the input is detected from the byte order mark or
determined by the InputEncoding property.
(Inherited from TextConverter) |
| Footer |
Get or set the text that will be appended to the end of the output.
(Inherited from TextConverter) |
| Header |
Get or set text that will be prepended to the beginning of the output.
(Inherited from TextConverter) |
| InputEncoding |
Get or set the input encoding.
(Inherited from TextConverter) |
| InputFormat |
Get the input format.
(Overrides TextConverterInputFormat) |
| InputStreamBufferSize |
Get or set the size of the input stream buffer.
(Inherited from TextConverter) |
| MaxColorTableEntries | Get or set the maximum number of color table entries. |
| MaxFontTableEntries | Get or set the maximum number of font table entries. |
| MaxGroupDepth | Get or set the maximum group depth. |
| OutputEncoding |
Get or set the output encoding.
(Inherited from TextConverter) |
| OutputFormat |
Get the output format.
(Overrides TextConverterOutputFormat) |
| OutputStreamBufferSize |
Get or set the size of the output stream buffer.
(Inherited from TextConverter) |
Methods
| Convert(String) |
Convert text from the InputFormat to the OutputFormat.
(Inherited from TextConverter) |
| Convert(Stream, Stream) |
Convert the contents of source from the InputFormat to the
OutputFormat and writes the resulting text to destination.
(Inherited from TextConverter) |
| Convert(Stream, TextWriter) |
Convert the contents of source from the InputFormat to the
OutputFormat and uses the writer to write the resulting text.
(Inherited from TextConverter) |
| Convert(TextReader, TextWriter) |
Convert the contents of reader from the InputFormat to the
OutputFormat and uses the writer to write the resulting text.
(Overrides TextConverterConvert(TextReader, TextWriter)) |
| Convert(TextReader, Stream) |
Convert the contents of reader from the InputFormat to the
OutputFormat and writes the resulting text to destination.
(Inherited from TextConverter) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |