3/6/2017 - 3:23 PM


' For complete examples and data files, please go to
'Get Configurations
Dim config As ViewerConfig = Utilities.GetConfigurations()

'Create html handler
Dim htmlHandler As New ViewerHtmlHandler(config)

'Guid implies that unique document name 
Dim guid As String = DocumentName

'Instantiate the HtmlOptions object
Dim options As New HtmlOptions()

'To get html representations of pages with embedded resources
options.IsResourcesEmbedded = False

'Set resource prefix
options.HtmlResourcePrefix = "{page-number}/resources/{resource-name}"
'The {page-number} and {resource-name} patterns will be replaced with current processing page number and resource name accordingly.

'To ignore resource prefix in CSS 
'options.IgnoreResourcePrefixForCss = true;

'Get document pages in html form
Dim pages As List(Of PageHtml) = htmlHandler.GetPages(guid, options)

For Each page As PageHtml In pages
    'Save each page at disk
    Utilities.SaveAsHtml(Convert.ToString(page.PageNumber + "_") & DocumentName, page.HtmlContent)