Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java
// Get Configurations
ViewerConfig config = Utilities.getConfiguration();
// Create html handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
String guid = DocumentName;
// Set CAD options to render two Layers
HtmlOptions options = new HtmlOptions();
options.getCadOptions().getLayers().add("electrical");
options.getCadOptions().getLayers().add("walls");
// Get pages
List<PageHtml> pages = htmlHandler.getPages(guid, options);
for (PageHtml page : pages)
{
//Save each page at disk
Utilities.saveAsHtml(page.getPageNumber() + "_" + DocumentName, page.getHtmlContent());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.