SharpRtfConvert 2.0.1

dotnet add package SharpRtfConvert --version 2.0.1
                    
NuGet\Install-Package SharpRtfConvert -Version 2.0.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="SharpRtfConvert" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpRtfConvert" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="SharpRtfConvert" />
                    
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 SharpRtfConvert --version 2.0.1
                    
#r "nuget: SharpRtfConvert, 2.0.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 SharpRtfConvert@2.0.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=SharpRtfConvert&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=SharpRtfConvert&version=2.0.1
                    
Install as a Cake Tool

SharpRtfConvert

Build status NuGet Version License

SharpRtfConvert is a .NET library for parsing Rich Text Format (RTF) streams and converting them to HTML. While initially adapted from the work started by Jani Giannoudis, it has been completely rewritten to support more features. When combined with the BracketPipe library, this library can also be used to convert RTF streams to various text format such as Markdown and Textile.

This is a fork from Elem.RtfPipe by elemdiscovery, from RtfPipe by cezarypiatek, from RtfPipe by erdomke.

Description Value
License The MIT License (MIT)
Documentation http://jeremyansel.github.io/SharpRtfConvert
Source code https://github.com/JeremyAnsel/SharpRtfConvert
Nuget https://www.nuget.org/packages/SharpRtfConvert
Build https://ci.appveyor.com/project/JeremyAnsel/sharprtfconvert/branch/main

Usage

Below is a simple example of converting an RTF string to an HTML string.

var html = Rtf.ToHtml(rtf);

RTF Support

This library attempts to support the core RTF features documented in the RTF Specification 1.9.1. These features include:

  • Character formatting (bold, italics, color, ...)
  • Tables (including nested tables, rows and columns merge)
  • Lists
  • Hyperlinks
  • Pictures
  • Heading levels
  • HTML encapsulation (e.g. as performed by Outlook)

With that said, there are numerous cases for non-trivial documents where the library will not produce the "correct" visual representation when compared to other RTF readers (such as MS Word).

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 was computed.  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 Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SharpRtfConvert:

Package Downloads
MewExtendedToolkit.Html

A .NET library with custom controls for MewUI. Include controls to show html and rtf documents.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 193 8/4/2026