11/9/2016 - 3:13 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

Dim options As New PdfFileOptions()

' set watermark properties
Dim watermark As New Watermark("This is watermark text")
watermark.Color = Color.Red
watermark.Position = (WatermarkPosition.Diagonal)
watermark.Width = 100

options.Watermark = watermark

' get file as pdf with print action
Dim container As FileContainer = htmlHandler.GetPdfFile(guid, options)

' save PDF file
Utilities.SaveFile(guid, container.Stream)