Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active January 11, 2019 16:09
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/0a4a1444b275ca058f7a7cec3681f8d2 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/0a4a1444b275ca058f7a7cec3681f8d2 to your computer and use it in GitHub Desktop.
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
// Setup GroupDocs.Viewer config
ViewerConfig config = Utilities.GetConfigurations();
// Create ViewerHandler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// Set guid
string guid = DocumentName;
// Set html options to render hidden sheets (do same while using ImageOptions)
HtmlOptions options = new HtmlOptions();
options.ShowHiddenPages = 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