Created
February 21, 2019 10:59
-
-
Save GroupDocsGists/f1415ae3e6563cbfb2c14103433a88ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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