Fixed HTML
- in this mode the HTML document compound using (x,y) positions and special CSS for each elements. This gives the best precision and accuracy, but makes the HTML markup more complex. The each document page presented by the separated <div> element with optional border.
Flowing HTML
- in this mode the HTML document compound using block elements the same as it would be typed by a human. The HTML-markup is simple and clear, but it doesn't preserve (x, y) position of some graphics elements.
using SautinSoft;
namespace Example
{
class Program
{
static void Main(string[] args)
{
ConvertDocxToHtml();
}
static void ConvertDocxToHtml()
{
string inpFile = @"..\..\..\example.docx";
string outfile = Path.GetFullPath("Result.html");
RtfToHtml r = new RtfToHtml();
r.Convert(inpFile, outfile, new RtfToHtml.HtmlFixedSaveOptions() {Title = "SautinSoft Example." });
// Open the result for demonstration purposes.
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outfile) { UseShellExecute = true });
}
}
}
The RTF to HTML .Net product provides a .NET assembly to convert DOCX, RTF, Text files to HTML. It offers various options for transforming Word documents into HTML5, 4.01, 3.2, and XHTML formats.
The product is compatible with multiple platforms, including Windows, macOS, and Linux, and can be deployed to Azure and AWS. It supports .NET 8, 7, 6, 5, Standard 2, Core 2x & 3x, and Framework 4.6.2+.