作者:LINBO-D_915 | 来源:互联网 | 2023-09-25 10:14
篇首语:本文由编程笔记#小编为大家整理,主要介绍了vbscriptRenderDocumentAsHtmlWithResourcePrefix.vb相关的知识,希望对你有一定的参考价值。
篇首语:本文由编程笔记#小编为大家整理,主要介绍了Vbscript RenderDocumentAsHtmlWithResourcePrefix.vb相关的知识,希望对你有一定的参考价值。
' For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
'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 = "http://contoso.com/api/getResource?name="
'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)
Next