Dim nImageID As Long
If Imaging1.TwainOpenDefaultSource() Then
Imaging1.TwainSetAutoFeed (True) 'Set AutoFeed Enabled
Imaging1.TwainSetAutoScan (True) 'To achieve the maximum scanning rate
Imaging1.TwainSetCurrentResolution (300)
Imaging1.TwainSetCurrentPixelType (TWPT_RGB) 'RGB
Imaging1.TwainSetCurrentBitDepth (8) ' 24 bpp
Imaging1.TwainPdfStart ("output.pdf")
Do
nImageID = Imaging1.TwainAcquireToGdPictureImage(Me.hWnd)
Call Imaging1.TwainAddGdPictureImageToPdf(nImageID)
Imaging1.CloseImage (nImageID)
Loop While Imaging1.TwainGetState > TWAIN_SOURCE_OPEN
Imaging1.TwainPdfStop
Call Imaging1.TwainCloseSource
MsgBox "Done !"
Else
MsgBox "can't open default source, twain state is: " & Trim(Str(Imaging1.TwainGetState))
End IfReturn to Example requests & Code samples
Users browsing this forum: Yahoo [Bot] and 1 guest