using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;

namespace RenderDOCXasHTMLUsingCSharp
{
    internal class Program
    {
        static void Main(string[] args)
        {
            // Set License to avoid the limitations of Viewer library
            License lic = new License();
            lic.SetLicense(@"GroupDocs.Viewer.lic");

            // Load the input DOCX
            using (var viewer = new Viewer("input.docx"))
            {
                // Create an HTML file for each document page.
                // {0} is replaced with the current page number in the file name.
                var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
                viewer.View(viewOptions);
            }
        }
    }
}