Use «RTF to HTML .Net» library under Windows


You can easily use «RTF to HTML .Net» in any .NET application, because of the component is completely written in C# managed code.

  1. Add dependencies through NuGet (optional).
  2. Add the reference to SautinSoft.RtfToHtml.dll.

Add dependencies through NuGet:

  1. Open Microsoft Visual Studio and create a new project or open an existing
  2. Solution Explorer Window –> right click by "References" –> Manage NuGet Packages... –> In the tab "Browse" type "sautinsoft" and find the "sautinsoft.rtftohtml"
  3. Install using nuget

  4. Select the desired version API and click "Install"

The selected API will be downloaded and referenced in your project. All dependencies are already installed automatically.

Using Manage NuGet Packages you can also update RTF to HTML .Net to the desired version.


2. Add the reference to SautinSoft.RtfToHtml.dll:

  1. First of all, download the RTF to HTML .Net package. Unzip it at any place in your computer and find the assembly file "SautinSoft.RtfToHtml.dll"
  2. Open Microsoft Visual Studio and create a new project or open an existing project
  3. Solution Explorer Window –> right click by "Dependencies" –> Add Project References –> In the tab "Browse" find the "SautinSoft.RtfToHtml.dll"
  4. Install adding reference

    Note
    SautinSoft.RtfToHtml.dll assemblies compiled for old .NET Framework 4.6.2 - 4.8 are located inside (rtftohtml_dll_net.zip –> RTF to HTML .Net (X.X.X.X)\Bin\.NET Framework X.X) folder.
    SautinSoft.RtfToHtml.dll assemblies compiled for new .NET 6 and up are located inside (rtftohtml_dll_net.zip –> RTF to HTML .Net (X.X.X.X)\Bin\.NET X.X) folder.

  5. Once you have referenced SautinSoft.RtfToHtml.dll, add these (or newer) dependencies to your project:
    • System.IO.Packaging (>=4.5.0)
    • System.Text.Encoding.CodePages (>=4.5.0)
    • SkiaSharp (>=2.88.7)
    • System.Xml.XPath.XmlDocument (>=4.7.0)
    • Svg.Skia (>=1.0.0.18)

Above we mentioned about the minimal versions of the dependencies, actually you can use newer versions.
Now your application is able to convert RTF, DOCX and Text to HTML!


If you need a new code example or have a question: email us at support@sautinsoft.com or ask at Online Chat (right-bottom corner of this page) or use the Form below:



Questions and suggestions from you are always welcome!

We are developing .Net components since 2002. We know PDF, DOCX, RTF, HTML, XLSX and Images formats. If you need any assistance with creating, modifying or converting documents in various formats, we can help you. We will write any code example for you absolutely free.