Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active March 7, 2022 13:03
Show Gist options
  • Save GroupDocsGists/a288003f8ef9b00c13e9bf1785d0c463 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/a288003f8ef9b00c13e9bf1785d0c463 to your computer and use it in GitHub Desktop.
Render Files to Clean HTML in .NET & Java
// Convert Word DOC/DOCX to Minified HTML using C#
using (Viewer viewer = new Viewer("path/document.docx"))
{
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("path/page_{0}.html");
options.Minify = true;
viewer.View(options);
}
// Convert Word DOC/DOCX to Minified HTML in Java
Viewer viewer = new Viewer("path/document.docx");
HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("path/page_{0}.html");
viewOptions.setMinify(true);
viewer.view(viewOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment