Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

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
Independent first-page render of the generated RTF change approval memo PDF
Change approval memo

The downloadable RTF and PDF come from the same OfficeIMO.Rtf model. The preview independently renders the first-party conversion result.

Download source RTF · View source · Explore the example

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.LoadResult("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 and inspect the API reference for this package.

Example source

Download source