multipage files acquisition with adding page confirmation

Example requests & Code samples for GdPicture Toolkits.
Post Reply
charuvas1
Posts: 38
Joined: Tue Dec 02, 2008 1:49 pm

multipage files acquisition with adding page confirmation

Post by charuvas1 » Wed Dec 03, 2008 1:38 pm

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

User avatar
Loïc
Site Admin
Posts: 5586
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: multipage files acquisition with adding page confirmatio

Post by Loïc » Mon Dec 08, 2008 2:40 pm

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

jsalcedo46
Posts: 3
Joined: Tue Oct 21, 2014 6:02 pm

Re: multipage files acquisition with adding page confirmatio

Post by jsalcedo46 » Tue Oct 21, 2014 6:04 pm

Hi, how can i replicate this behavior with the GDPicture 5 ?

jsalcedo46
Posts: 3
Joined: Tue Oct 21, 2014 6:02 pm

Re: multipage files acquisition with adding page confirmatio

Post by jsalcedo46 » Thu Oct 23, 2014 3:16 pm

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

jsalcedo
Posts: 5
Joined: Wed Jul 07, 2010 12:12 am

Re: multipage files acquisition with adding page confirmatio

Post by jsalcedo » Tue Nov 18, 2014 4:05 pm

Hi, how can i replicate this behavior with the GDPicture 5 ?

User avatar
Loïc
Site Admin
Posts: 5586
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: multipage files acquisition with adding page confirmatio

Post by Loïc » Wed Nov 19, 2014 7:41 pm

Hi,

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

Kind regards,

Loïc

jsalcedo
Posts: 5
Joined: Wed Jul 07, 2010 12:12 am

Re: multipage files acquisition with adding page confirmatio

Post by jsalcedo » Thu Nov 20, 2014 10:04 pm

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 2967 times
:

Thanks..

jsalcedo46
Posts: 3
Joined: Tue Oct 21, 2014 6:02 pm

Re: multipage files acquisition with adding page confirmatio

Post by jsalcedo46 » Wed Nov 26, 2014 9:58 pm

any help?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests