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-.NET
//Get Configurations
ViewerConfig config = Utilities.GetConfigurations();
// Create html handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// Guid implies that unique document name
string guid = DocumentName;
// Set CAD options to render Model and all non empty Layouts
HtmlOptions options = new HtmlOptions();
options.CadOptions.RenderLayouts = true;
// Get pages
List<PageHtml> pages = htmlHandler.GetPages(guid, options);
foreach (PageHtml page in pages)
{
//Save each page at disk
Utilities.SaveAsHtml(page.PageNumber + "_" + DocumentName, page.HtmlContent);
}
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.