jm.RtfPipe
1.0.1
dotnet add package jm.RtfPipe --version 1.0.1
NuGet\Install-Package jm.RtfPipe -Version 1.0.1
<PackageReference Include="jm.RtfPipe" Version="1.0.1" />
<PackageVersion Include="jm.RtfPipe" Version="1.0.1" />
<PackageReference Include="jm.RtfPipe" />
paket add jm.RtfPipe --version 1.0.1
#r "nuget: jm.RtfPipe, 1.0.1"
#:package jm.RtfPipe@1.0.1
#addin nuget:?package=jm.RtfPipe&version=1.0.1
#tool nuget:?package=jm.RtfPipe&version=1.0.1
jm.RtfPipe
This is a fork of the erdomke/RtfPipe repository, which seems to be no longer maintainable.
jm.RtfPipe 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.
Usage
Below is a simple example of converting an RTF string to an HTML string.
NOTE: When using this in .Net Core, be sure to include the NuGet package
System.Text.Encoding.CodePages
. Also call the line marked in the region before calling any functions in the library.
#if NETCORE
// Add a reference to the NuGet package System.Text.Encoding.CodePages for .Net core only
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
#endif
var html = Rtf.ToHtml(rtf);
Installing via NuGet
Install-Package jm.RtfPipe
Building
Run build.ps1
from the root of the project to build it. The NuGet package will be output to the
artifacts
directory.
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)
- 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).
.Net Targets
The NuGet package can be used with the following .Net targets
- .Net 3.5+
- .Net Standard 2.0+
Product | Versions 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 was computed. 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 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 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 | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. 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. |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.