SharpRtfConvert 2.0.1
dotnet add package SharpRtfConvert --version 2.0.1
NuGet\Install-Package SharpRtfConvert -Version 2.0.1
<PackageReference Include="SharpRtfConvert" Version="2.0.1" />
<PackageVersion Include="SharpRtfConvert" Version="2.0.1" />
<PackageReference Include="SharpRtfConvert" />
paket add SharpRtfConvert --version 2.0.1
#r "nuget: SharpRtfConvert, 2.0.1"
#:package SharpRtfConvert@2.0.1
#addin nuget:?package=SharpRtfConvert&version=2.0.1
#tool nuget:?package=SharpRtfConvert&version=2.0.1
SharpRtfConvert
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 | Versions 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. |
-
.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 |