Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active December 11, 2018 17:26
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/e5de6b2299ae2d0bfa854d61ff2e29da to your computer and use it in GitHub Desktop.
Save GroupDocsGists/e5de6b2299ae2d0bfa854d61ff2e29da 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
ViewerConfig config = Utilities.GetConfigurations();
// Create html handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
string guid = DocumentName;
// Set Cells options to ignore empty rows
HtmlOptions options = new HtmlOptions();
options.CellsOptions.IgnoreEmptyRows = true; // default value is false
// 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