HTML to RTF .Net

.NET assembly to convert HTML to DOCX, RTF and Text.

using SautinSoft.HtmlToRtf;

                class Program
                {
                    static void Main(string[] args)
                    {
                        // Create an instance of the HtmlToRtf class
                        HtmlToRtf h = new HtmlToRtf();
                        // Specify the input HTML file and the output DOCX file
                        string inputFile = @"..\..\..\Sample.html";
                        string outputFile = "Result.docx";
                        // Convert HTML to DOCX
                        bool result = h.ConvertHtmlFileToDocxFile(inputFile, outputFile);
                        if (result)
                        {
                            Console.WriteLine("HTML successfully converted to DOCX.");
                        }
                        else
                        {
                            Console.WriteLine("Conversion failed.");
                        }
                    }
                }
Convert HTML file to DOCX file

The HTML to RTF .Net product includes a sample code for converting an HTML document to a DOCX file. This example demonstrates how to use the library to programmatically convert an HTML page into a DOCX document.

The product supports various platforms, including Windows, Linux, macOS, and Docker, and is compatible with .NET 8, 7, 6, 5, Standard 2, Core 2x, and 3x, as well as Framework 4.6.2+.