Skip to main content

Rich Text Format engine

OfficeIMO.Rtf

Read, create, edit, preserve, and convert Rich Text Format documents with bounded parsing and explicit fidelity reports.

MIT licensed No Office required Cross-platform .NET
Install dotnet add package OfficeIMO.Rtf
Generated output ยท OfficeIMO.Rtf
GENERATED OUTPUT

Ready for your workflow

Build, inspect, and transform documents through a focused API.

C#
using var document = CreateDocument();
document.Save();

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.

Next step

Turn the package into a working document.

Follow a focused guide, inspect the generated API reference, or try a browser-safe conversion.