I m trying to create images from pdf document with Windows Service created using VB.Net.
The code works fine with Windows XP and Windows 2003.
Here is the code:
Dim ObjDoc As New Acrobat.AcroPDDoc()
ObjDoc.Open(SourcePDFFilePath)
Dim ObjPage As Acrobat.AcroPDPage = ObjDoc.AcquirePage(0)
Dim ObjPageSize As Object = ObjPage.GetSize()
Dim ObjRect As New Acrobat.AcroRect()
With ObjRect
.Left = 0
.Top = 0
.right = CShort(ObjPageSize.x * _ZoomLevel / 100)
.bottom = CShort(ObjPageSize.y * _ZoomLevel / 100)
End With
ObjPage.CopyToClipboard(ObjRect, 0, 0, _ZoomLevel)
Dim ObjImage As Bitmap = My.Computer.Clipboard.GetImage()
The CopyToClipboard function returns true but the page image is not available in clipboard.
Thanks in advance.