Code: Select all
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 If
I have some tips about scanning documents to the pdf like:
1.You require a printer with SCAN workability or a scanner.
2.Place the record you wish to filter confront down on the glass surface. Ensure the surface is spotless.
3.Pick PDF as the record sort to check the report, name the document and finish the sweep.
4.At the point when the archive is checked to a few PCs, an organizer named My Scans is consequently set up. If not, make and name your own. 5.envelope. Anything you output will go naturally to this envelope.
please find a code snippet based on GdPicture.NET 14 here:
Creating a searchable PDF (PDF/A) document from the content of the document feeder of a scanner
http://guides.gdpicture.com/content/web ... nner.html
Hopefully, it helps.
Who is online
Users browsing this forum: No registered users and 0 guests