OfficeIMO.Word.Rtf 3.6.1

Prefix Reserved
dotnet add package OfficeIMO.Word.Rtf --version 3.6.1
                    
NuGet\Install-Package OfficeIMO.Word.Rtf -Version 3.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Word.Rtf" Version="3.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Word.Rtf" Version="3.6.1" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Word.Rtf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Word.Rtf --version 3.6.1
                    
#r "nuget: OfficeIMO.Word.Rtf, 3.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Word.Rtf@3.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Word.Rtf&version=3.6.1
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Word.Rtf&version=3.6.1
                    
Install as a Cake Tool

OfficeIMO.Word.Rtf

OfficeIMO.Word.Rtf maps RTF documents to and from OfficeIMO.Word. It also exposes RTF-facing document workflows that reuse the Word engines and return a combined fidelity report.

Convert with diagnostics

using OfficeIMO.Rtf;
using OfficeIMO.Word;
using OfficeIMO.Word.Rtf;

RtfDocument rtf = RtfDocument.Load("input.rtf");
using WordDocument word = rtf.ToWord(new RtfWordExportOptions { FailOnLoss = true }, out OfficeConversionReport report);
word.Save("output.docx");

The reverse direction is word.ToRtf(options, out report) for the RTF model and word.SaveAsRtf(path, options) for a file; WordRtfExportOptions carries the RTF writer settings and encoding. A parsed RtfReadResult converts with ToWord, adding its read diagnostics to the report.

Supported text, tabs, breaks, images and note references retain their order when combined within one Word run. Conversion keeps surrounding text and each note reference without changing the Word source.

Run Word workflows from RTF

RtfWordWorkflowResult<int> result = rtf.FindAndReplaceResult(
    "Contoso Ltd.",
    "Contoso Europe");

Console.WriteLine($"Replacements: {result.WorkflowResult}");
result.ThrowIfLoss();
result.Document.Save("updated.rtf");

Result-bearing workflows include:

  • MailMergeResult
  • FindAndReplaceResult
  • UpdateFieldsResult
  • MergeResult
  • CompareResult

Each result contains the normalized RTF document, the workflow-specific result, and one RtfConversionReport covering input mapping, the Word operation, and output mapping. Mail merge, field evaluation, comparison, and Word document merge remain owned by OfficeIMO.Word; this package does not maintain a second implementation.

Fidelity boundary

Common paragraphs, rich runs, tables, nested tables, images, notes, headers/footers, sections, styles, numbering, links, bookmarks, revisions, and comments map through the bridge. Unsupported Word elements and unsupported RTF objects/shapes are reported as omissions. Use ThrowIfLoss() when those omissions must stop the workflow.

Ordinary uncropped inline RTF pictures in headers and footers retain the legacy VML picture carrier when written to Word. The carrier preserves their exact-line overhang through saving, reopening and subsequent PDF conversion. The destination's modern compatibility mode is unchanged. Body, note, cell, text-box and cropped-picture paths retain their existing DrawingML mapping.

Paragraph mapping retains minimum, exact, and multiple line spacing, including the sign and units described in the RTF paragraph contract. The same effective-formatting path applies supported spacing, indentation, alignment, and tab stops to body paragraphs, table cells, notes, and running stories. Parsed RTF retains its active spacing and tab state; API-authored RTF paragraphs can inherit those properties from their styles. Missing non-auto before/after gaps in parsed paragraphs map to explicit zero, so the destination document's paragraph defaults do not add spacing. Explicit source values and automatic spacing remain in effect.

An RTF paragraph's active tab list replaces inherited tab lists. The bridge adds Word tab clears for unused positions declared anywhere in the associated paragraph-style chain, while retaining active positions and their alignment and leaders.

An explicitly selected default font from the RTF font table becomes the Word document's default font. Paragraph styles and individual runs can override it. An unset or unresolved font identifier retains the destination's existing default policy.

Table import retains a borderless, zero-padding source instead of adding Word table preset borders and margins. An explicit, uniform nonnegative row half-gap maps to direct left/right Word table cell margins. New Word documents use modern layout, where a uniform source row indent maps directly to the Word table indent. Legacy Word layout includes the half-gap in that stored indent; reverse conversion accounts for the source document's compatibility mode. Explicit cell padding overrides row padding and the half-gap, including zero.

Word-to-RTF recovers a half-gap from symmetric direct table margins in twips and a representable indent; other direct margins remain row padding. The qualified borderless left-aligned profile retains its content origin across modern mapping and legacy native import. Word ignores table indentation for centered and right-aligned tables; their placement follows the selected Word layout mode. These mappings do not establish native geometry for arbitrary padding, borders or alignments. Word spacing between separated cells is omitted with WordRtfTableCellSpacingOmitted. Missing, mixed, negative or unrepresentable RTF row half-gaps use zero table margins and report RtfWordTableCellGapFlattened. See the support matrix for the supported ranges.

NormalizeTablesForOnline() preserves explicit host-cell top/bottom margins, including zero, and direct table/cell top-border declarations, including border suppression. It supplies fallbacks only where those values are absent.

Parsed legacy RTF can project ordinary note destinations to section-end Word endnotes. Modern note mode retains ordinary footnotes; \ftnalt marks endnotes. The RTF note-mode policy distinguishes the effective projection from the unchanged raw source note kind and settings.

Paragraph frames become ordinary text flow rather than positioned frames. RTF-to-Word reports RtfWordParagraphFramesFlattened; Word-to-RTF reports WordRtfParagraphFramesFlattened. Word tab-stop clearing instructions (w:tab with w:val="clear") are omitted with WordRtfTabClearsOmitted; supported active tab stops are mapped separately. Word-side diagnostics include paragraph properties in document defaults, styles and individual stories. These are conversion losses, so ThrowIfLoss() rejects them.

Legacy RTF paragraph numbering maps to editable Word lists for single-level decimal numbers and text bullets. Authored starts, cached numbering jumps, marker prefixes and suffixes, and basic marker formatting are retained. Body and table paragraphs share their numbering sequence; each header, footer, and note starts an independent sequence. Conversion leaves the source RTF model unchanged.

Legacy multilevel and continuation forms, special table numbering, spacing controls, and other numeric formats use cached or resolved marker text and report RtfWordLegacyNumberingFlattened. ThrowIfLoss() rejects these conversions because editable numbering or marker formatting is not fully retained.

Dependency footprint

  • External: None beyond the dependencies of its OfficeIMO format packages.
  • OfficeIMO: OfficeIMO.Word and OfficeIMO.Rtf; Word workflows are reused instead of reimplemented.

See the complete OfficeIMO package map for related formats and conversion paths.

Generated capability summary

This table is generated from the package-neutral OfficeIMO operation catalog. The detailed source contracts remain authoritative for feature-level behavior and limitations.

Operation Supported Partial Preserved Rejected Unsupported Not applicable
Convert 2 0 0 0 0 0

The complete rows for OfficeIMO.Word.Rtf are published in the generated operation contract.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OfficeIMO.Word.Rtf:

Package Downloads
OfficeIMO.Workflows

Typed local document workflows that compose first-party OfficeIMO conversion, PDF, and provenance capabilities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.1 136 11/10/2026
3.6.0 208 11/6/2026
3.5.3 133 10/31/2026
3.5.2 105 10/24/2026
3.5.1 218 10/16/2026
3.4.5 726 10/10/2026
3.4.4 317 9/27/2026
3.4.3 675 9/12/2026
3.4.2 183 9/9/2026
3.4.1 205 9/7/2026
3.4.0 160 9/6/2026
3.3.0 135 9/2/2026
3.2.7 133 8/29/2026
3.2.6 230 8/22/2026
3.2.5 220 8/21/2026
3.2.4 234 8/19/2026
3.2.3 131 8/17/2026
3.2.2 334 8/13/2026
3.2.1 262 8/11/2026
3.2.0 419 8/7/2026
Loading failed