4/29/2016 - 5:42 PM


' 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()

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

'Get document pages in image form
Using fileStream As New FileStream("C:\storage\word.doc", FileMode.Open, FileAccess.Read)
	' Get pages by absolute path
	Dim pages As List(Of PageImage) = imageHandler.GetPages(fileStream, options)

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