NRtfTree is an open source (GPL) library written entirely in C# which may be used to manage RTF documents in your own applications.
NRtTree will help you:
- Open and parse RTF files.
- Analyze the content of RTF files.
- Add, modify and remove document elements (text, control words, control symbols...).
- Create new RTF documents.
RTF (Rich Text Format) is a method of encoding formatted text and graphics for easy transfer between applications. An RTF document can contain text, images, tables, lists, hyperlinks and many other text and graphic elements.
In addition, RTF is the format used internally by the RichTextBox control included as part of .NET Framework. Nevertheless, its functionality is not enough to satisfy all aspects of RTF file management.
NRtfTree has two modes of operation:
- DOM-like mode: RTF documents are loaded in a tree structure and are provided several methods to traverse it, access tag contents and modify or create new nodes. This implementation requires the entire content of a document to be parsed and stored in memory.
- SAX-like mode: RTF file parser is implemented as an event-driven model in which the programmer provides callback methods which are invoked by the parser as part of its traversal of the RTF document.