ImageGear23.Twain Assembly > ImageGear.TWAIN Namespace > ImGearTWAIN Class : AcquireToFile Method |
'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 )
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.