Open Microsoft Visual Studio and create a new project or open an existing
Solution Explorer Window –> right click by "References" –> Manage NuGet Packages... –> In the tab "Browse" type "sautinsoft" and find the "sautinsoft.rtftohtml"
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:
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"
Open Microsoft Visual Studio and create a new project or open an existing project
Solution Explorer Window –> right click by "Dependencies" –> Add Project References –> In the tab "Browse" find the "SautinSoft.RtfToHtml.dll"
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.
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: