Private Sub ConvertPDFToImage(ByVal strFileName As String)
Dim f As New SautinSoft.PdfFocus()
f.OpenPdf(strFileName)
If f.PageCount > 0 Then
f.ImageOptions.Dpi = 200
f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
For page As Integer = 1 To f.PageCount
f.ToImage("D:\KIMBALL ELECTRONIC\IT\C\picture" & "page" & page & ".jpg", page)
Next
End If
End Sub
Private Shared Sub Main(ByVal args As String())
Dim di As New IO.DirectoryInfo("D:\KIMBALL ELECTRONIC\IT\C\")
Dim diar1 As IO.FileInfo() = di.GetFiles()
Dim dra As IO.FileInfo
For Each dra In diar1
ConvertPDFToImage(dra) 'ตรงนี้มันไม่รู้ค่าอะคะ
Next
End Sub