10/19/2017 - 11:23 AM


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

' Create image handler 
Dim imageHandler As New ViewerImageHandler(config)

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

'Initialize ImageOptions Object
Dim options As New ImageOptions()

imageOptions.ConvertImageFileType = ConvertImageFileType.JPG
imageOptions.JpegQuality = 100

' Set password if document is password protected. 
If Not [String].IsNullOrEmpty(DocumentPassword) Then
	options.Password = DocumentPassword
End If

'Get document pages in image form
Dim Images As List(Of PageImage) = imageHandler.GetPages(guid, options)

For Each image As PageImage In Images
	'Save each image at disk
	Utilities.SaveAsImage(image.PageNumber + "_" + DocumentName, image.Stream)