Home | Translator | About us | Overview | Software - Download | Evaluate | Order | Support | Contact | F.A.Q. | Documentations | Blog | Newsletter | Site Content Search
Loading...

Scanning to PDF

Example requests & Code samples for GdPicture ActiveX.

Scanning to PDF

Postby 2basix » Thu May 24, 2007 10:04 am

Is there a way to scan documents to multiple page PDF ?
--== Keep IT Basic ==--
User avatar
2basix
 
Posts: 7
Joined: Wed May 23, 2007 2:23 pm
Location: Netherlands

Re: Scanning to PDF

Postby Loïc » Thu Mar 20, 2008 1:27 pm

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
User avatar
Loïc
Site Admin
 
Posts: 3444
Joined: Tue Oct 17, 2006 11:48 pm
Location: France


Return to Example requests & Code samples

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest