Link Search Menu Expand Document

Convert DOCX to HTML - C#

PDF SDK sample in C# demonstrating ‘Convert DOCX to HTML’

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

// IMPORTANT: This functionality is outdated! Please try Web API version for better results. Free signup:
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;

Download Source Code (.zip)

Return to the previous page Explore PDF SDK