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

Scan Multipe Single Pages to 1 PDF

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

Scan Multipe Single Pages to 1 PDF

Postby uccu » Tue Jul 08, 2008 10:27 pm

Is it possible to scan mulitple duplexed single Page documents into 1 PDF. I am going to guess and say that it is.

Is it as simple as not closing the image file and scanning the next document and then using the TwainAddGdPictureImageToPdf or is it a little more involved?
uccu
 
Posts: 10
Joined: Tue Jun 24, 2008 9:31 am

Re: Scan Multipe Single Pages to 1 PDF

Postby Loïc » Wed Jul 09, 2008 5:03 pm

Hi,

This is a code snipet to acquire all the document feeder into one multipage pdf file using duplex scanning mode:


Code: Select all
Twain1.TwainOpenDefaultSource
Twain1.TwainSetAutoFeed (True)
Twain1.TwainSetAutoScan (True)
Twain1.TwainEnableDuplex (True)
Twain1.TwainPdfStart ("output.pdf")
While Twain1.TwainAcquireToGdPictureImage(Me.hWnd) <> 0
      Call Twain1.TwainAddGdPictureImageToPdf(Twain1.GetNativeImage)
      Twain1.CloseNativeImage
Wend
Twain1.TwainPdfStop
Call Twain1.TwainCloseSource


Best regards,

Loïc
User avatar
Loïc
Site Admin
 
Posts: 3425
Joined: Tue Oct 17, 2006 11:48 pm
Location: France

Re: Scan Multipe Single Pages to 1 PDF

Postby uccu » Wed Jul 09, 2008 6:30 pm

Loïc

I forgot to mention that there is no Document Feeder on this scanner.
uccu
 
Posts: 10
Joined: Tue Jun 24, 2008 9:31 am

Re: Scan Multipe Single Pages to 1 PDF

Postby Loïc » Wed Jul 09, 2008 6:40 pm

Hi,

It is the same kind of code:


First Step: Open the Scanner & Initialize the output PDF

Code: Select all
Twain1.TwainOpenDefaultSource
Twain1.TwainEnableDuplex (True)
Twain1.TwainPdfStart ("output.pdf")



Second Step: Acquire each image in duplex mode. Repeat this step for each image to scan

Code: Select all
'Front
Twain1.TwainAcquireToGdPictureImage(Me.hWnd)
Call Twain1.TwainAddGdPictureImageToPdf(Twain1.GetNativeImage)
Twain1.CloseNativeImage

'Back
Twain1.TwainAcquireToGdPictureImage(Me.hWnd)
Call Twain1.TwainAddGdPictureImageToPdf(Twain1.GetNativeImage)
Twain1.CloseNativeImage



Last Step: Save PDF & close the scanner

Code: Select all
Twain1.TwainPdfStop
Call Twain1.TwainCloseSource



Loïc
User avatar
Loïc
Site Admin
 
Posts: 3425
Joined: Tue Oct 17, 2006 11:48 pm
Location: France


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest