Page 1 of 1

multipage files acquisition with adding page confirmation

Posted: Wed Dec 03, 2008 1:38 pm
by charuvas1
Hi,

Thank you for the prompt reply to my previous post. I hv another question for you. While scanning, I want all the pages to go to a single file untill user says not to. Following would be the algorithm for it-

1) open default scanner
2) start multipage file
3) scan and save all the pages in the feeder
4) ask the user whether he want to scan more pages.
5) if yes..then go back to step 1 else close the multipage file and scanner.

The multipage files could be pdf or tiff.

Thank you
Charu Vasudev

Re: multipage files acquisition with adding page confirmatio

Posted: Mon Dec 08, 2008 2:40 pm
by Loïc
Hi,

Here is a vb6 sample to acquire image from document feeder & asking to the user to acquire other pages when the feeder is empty:

Code: Select all

   Dim nImageID As Long
   Dim bContinue As Boolean
   
   bContinue = True
   Imaging1.SetLicenseNumber ("XXX")
   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")
     Imaging1.TwainDisableAutoSourceClose (True)
      
      Do
       nImageID = Imaging1.TwainAcquireToGdPictureImage(Me.hWnd)
       If nImageID <> 0 Then
          Call Imaging1.TwainAddGdPictureImageToPdf(nImageID)
          Imaging1.CloseImage (nImageID)
       End If
       If Imaging1.TwainGetState <= 5 Then
 
         If MsgBox("Do you want to scan other image ?", vbYesNo, "") <> 6 Then
            bContinue = False
         End If
       End If
       
      Loop While bContinue
     
      Imaging1.TwainPdfStop
      Call Imaging1.TwainCloseSource
      MsgBox "Done !"
   Else
      MsgBox "can't open default source, twain state is: " & Trim(Str(Imaging1.TwainGetState))
   End If

Best regards,

Loïc

Re: multipage files acquisition with adding page confirmatio

Posted: Tue Oct 21, 2014 6:04 pm
by jsalcedo46
Hi, how can i replicate this behavior with the GDPicture 5 ?

Re: multipage files acquisition with adding page confirmatio

Posted: Thu Oct 23, 2014 3:16 pm
by jsalcedo46
Hi,

I tried to replicate the situation using:

Code: Select all

oGdPictureImaging.TwainSetAutoSourceClose(false);
But the scanner prompt keeps closing...

Any help would be appreciated..

BYe

Re: multipage files acquisition with adding page confirmatio

Posted: Tue Nov 18, 2014 4:05 pm
by jsalcedo
Hi, how can i replicate this behavior with the GDPicture 5 ?

Re: multipage files acquisition with adding page confirmatio

Posted: Wed Nov 19, 2014 7:41 pm
by Loïc
Hi,

This topic and its associated code snippet is based on GdPicture 5.

Kind regards,

Loïc

Re: multipage files acquisition with adding page confirmatio

Posted: Thu Nov 20, 2014 10:04 pm
by jsalcedo
Sorry, the version i am using it's the 6.7.0.4.

But i cant find the function and none other its working like i want to

Code: Select all

oGdPictureImaging.TwainSetAutoSourceClose(false);

dd.png
dd.png (8.56 KiB) Viewed 18319 times
:

Thanks..

Re: multipage files acquisition with adding page confirmatio

Posted: Wed Nov 26, 2014 9:58 pm
by jsalcedo46
any help?

Re: multipage files acquisition with adding page confirmation

Posted: Fri Jan 18, 2019 10:15 am
by Gabriela
Hi,

Please find here the example working with the current version GdPicture14:
https://www.gdpicture.com/guides/gdpicture/web ... tocol.html