Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert Word documents to Responsive HTML Pages using .NET & Java APIs
// Convert Word DOC/DOCX documents to HTML Responsive Page in C#
using (Viewer viewer = new Viewer(@"path/document.docx"))
{
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("path/page_{0}.html");
options.RenderResponsive = true; // Set the Responsive as true
viewer.View(options);
}
// Convert Word DOC/DOCX documents to HTML Responsive Page in Java
try (Viewer viewer = new Viewer("path/document.docx")) {
HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("path/page_{0}.html");
viewOptions.setRenderResponsive(true);
viewer.view(viewOptions);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment