ImageGear .NET
AcquireToFile Method




The pathname of the file or directory to which pages are stored.
Count of pages to scan. -1 scans all available pages.
The format of the file to scan to.
Specifies whether every scanned page should be saved in the separate file or not.
Scan multiple pages from a scanner equipped with an Automatic Document Feeder (ADF) to a specified file or directory.
Syntax
'Declaration
 
Public Sub AcquireToFile( _
   ByVal fileName As String, _
   ByVal pageCount As Integer, _
   ByVal fileFormat As ImGearSavingFormats, _
   ByVal savePagesSeparately As Boolean _
) 
'Usage
 
Dim instance As ImGearTWAIN
Dim fileName As String
Dim pageCount As Integer
Dim fileFormat As ImGearSavingFormats
Dim savePagesSeparately As Boolean
 
instance.AcquireToFile(fileName, pageCount, fileFormat, savePagesSeparately)
public void AcquireToFile( 
   string fileName,
   int pageCount,
   ImGearSavingFormats fileFormat,
   bool savePagesSeparately
)
public: void AcquireToFile( 
   string* fileName,
   int pageCount,
   ImGearSavingFormats fileFormat,
   bool savePagesSeparately
) 
public:
void AcquireToFile( 
   String^ fileName,
   int pageCount,
   ImGearSavingFormats fileFormat,
   bool savePagesSeparately
) 

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:

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

Reference

ImGearTWAIN Class
ImGearTWAIN Members
ImGearSavingFormats Enumeration

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback