Vista Ultimate
GDPicture 5.12.8
Kyocera KM-1820 (All in One) with driver 3.1.1819
Code...
Code: Select all
Dim nImageID As Integer
AxImaging1.TwainLogStart("c:\twainlog.txt")
If AxImaging1.TwainOpenDefaultSource() Then
InitScanConfig()
AxImaging1.TwainSetAutoFeed(True) 'Set AutoFeed Enabled
AxImaging1.TwainSetAutoScan(True) 'To achieve the maximum scanning rate
AxImaging1.TwainSetCurrentResolution(300)
AxImaging1.TwainSetCurrentPixelType(GdPicturePro5.TwainPixelType.TWPT_RGB) 'RGB
AxImaging1.TwainSetCurrentBitDepth(8) ' 24 bpp
AxImaging1.TwainPdfStart(imagepath & "Temp.pdf")
While AxImaging1.CreateImageFromTwain(Me.Handle.ToInt32) <> 0
nImageID = AxImaging1.GetNativeImage
DisplayNativeImage()
AxImaging1.TwainAddGdPictureImageToPdf(nImageID)
AxImaging1.CloseImage(nImageID)
End While
AxImaging1.TwainPdfStop()
AxImaging1.TwainCloseSource()
MsgBox("Done !")
Else
MsgBox("Can't open default source, TWAIN state is: " & Trim(Str(AxImaging1.TwainGetState)))
End If