Convert DOCX to HTML - C#
PDF SDK sample in C# demonstrating ‘Convert DOCX to HTML’
Program.cs
using System.Diagnostics;
using Bytescout.PDF.Converters;
// IMPORTANT: This functionality is outdated! Please try Web API version for better results. Free signup: https://pdf.co/
namespace ConvertDocxToHtml
{
class Program
{
static void Main(string[] args)
{
using (DocxToHtmlConverter converter = new DocxToHtmlConverter())
{
converter.IndentHtmlCode = true;
converter.WriteByteOrderMark = true;
converter.ConvertDocxToHtml("sample.docx", "result.html", true);
}
// Open result document in default associated application (for demo purpose)
ProcessStartInfo processStartInfo = new ProcessStartInfo("result.html");
processStartInfo.UseShellExecute = true;
Process.Start(processStartInfo);
}
}
}