ImageGear for .NET
AcquireToFile Method
See Also  Send Feedback
ImageGear21.Twain Assembly > ImageGear.TWAIN Namespace > ImGearTWAIN Class : AcquireToFile Method




fileName
The pathname of the file or directory to which pages are stored.
pageCount
Count of pages to scan. -1 scans all available pages.
fileFormat
The format of the file to scan to.
savePagesSeparately
Specifies whether every scanned page should be saved in the separate file or not.

Glossary Item Box

Scan multiple pages from a scanner equipped with an Automatic Document Feeder (ADF) to a specified file or directory.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Parameters

fileName
The pathname of the file or directory to which pages are stored.
pageCount
Count of pages to scan. -1 scans all available pages.
fileFormat
The format of the file to scan to.
savePagesSeparately
Specifies whether every scanned page should be saved in the separate file or not.

Remarks

Prior to calling this method:

  • Call OpenSource to select the desired Data Source.
  • Call SetCapability to set desired capability values.
  • Set UseUI to true if you want to obtain the capability settings from the end user.

If fileName specifies a directory, then a separate file of type fileFormat will be created for each scanned page, for example: 0000001.tif, 00000002.tif, 00000003.tif, etc. If these files already exist, the existing files will be replaced. The value of savePagesSeparately will be ignored.

If fileName specifies a file name, and savePagesSeparately is set to true, then a separate file will be created for each scanned page. The names of each file will be based on the fileName specified. For example, If fileName = "ScanTest.bmp", each page will be named as follows: ScanTest.bmp, ScanTest0.bmp, ScanTest1.bmp, ScanTest10.bmp, ScanTest11.bmp, etc. If these files already exist, they will be replaced.

If fileName specifies a file name, and savePagesSeparately is set to false, and fileFormat is set to a multiple page format such as TIFF, DCX, or MO:DCA, then the images will be stored in one file with the specified fileName.

If fileName specifies a file name, and savePagesSeparately is set to false, and fileFormat is set to a single page format, then savePagesSeparately will be ignored and behave the same as if it was set to true.

See Also

©2013. Accusoft Corporation. All Rights Reserved.