ByteScout PDF SDK – C# – Convert DOCX to HTML

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – C# – Convert DOCX to HTML

ByteScout PDF SDK – C# – Convert DOCX to HTML

Program.cs

using System.Diagnostics;
using Bytescout.PDF.Converters;

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);
        }
    }
}


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next