11/9/2016 - 2:46 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

' add watermark
Dim watermark As New Watermark("This is watermark text")
watermark.Color = Color.Red
watermark.Position = WatermarkPosition.Diagonal
watermark.Width = 100
watermark.FontName = """Comic Sans MS"", cursive, sans-serif"

Dim printableHtmlOptions As New PrintableHtmlOptions(guid, watermark)

' get printable html in PrintableHtmlContainer
Dim container As PrintableHtmlContainer = htmlHandler.GetPrintableHtml(printableHtmlOptions)

' save html content 
Utilities.SaveAsHtml(guid, container.HtmlContent)