Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active September 23, 2021 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/a74b1e67139b125f6f1be4709abca7cf to your computer and use it in GitHub Desktop.
Save GroupDocsGists/a74b1e67139b125f6f1be4709abca7cf to your computer and use it in GitHub Desktop.
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