One engine for normalized and source-preserving RTF work
OfficeIMO.Rtf exposes an editable semantic document for normal authoring and a lossless syntax tree for surgical changes that must retain untouched producer data.
using OfficeIMO.Rtf;
RtfReadResult read = RtfDocument.Load("input.rtf");
RtfDocument document = read.Document;
document.ReplaceText("Draft", "Approved");
File.WriteAllText("approved.rtf", document.ToRtf());
Useful for
- Generating RTF reports, letters, and interchange documents.
- Editing text, bookmarks, images, metadata, headers, and selected syntax without Microsoft Word.
- Processing uploaded RTF with limits on depth, tokens, text, binary payloads, images, objects, and output blocks.
- Converting between RTF and Word, Markdown, HTML, PDF, or Reader results.
- Enforcing a no-loss policy from structured conversion diagnostics.
The parser supports legacy code pages used by Word and Outlook producers and retains unknown syntax on the lossless path. It never fetches external resources.
Start with the RTF guide or inspect the support matrix.