Created
October 19, 2017 10:57
-
-
Save GroupDocsGists/6e66d9964084e80cca6923455ba5cea0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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-.NET | |
| //Get Configurations | |
| ViewerConfig config = Utilities.GetConfigurations(); | |
| // Create html handler | |
| ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config); | |
| // Guid implies that unique document name | |
| string guid = DocumentName; | |
| //Instantiate the HtmlOptions object | |
| HtmlOptions options = new HtmlOptions(); | |
| options.ExcludeFonts = true; | |
| //Get document pages in html form | |
| 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