Hello.
I'm developing an application with VintasoftTwain.Net library 5.0.
It is working fine with FLATBED scanner. It scans document one by one.
I used the following code.
Dim oImageMemoryStream as memorystream
If bFirstImage Then
oImageMemoryStream = VSTwain.GetImageAsStream(0, ImageFileFormat.TIFF)
bFirstImage = False
Else
VSTwain.SaveImageToStream(0, oImageMemoryStream, ImageFileFormat.TIFF)
oImageMemoryStream = VSTwain.GetImageAsStream(0, ImageFileFormat.TIFF)
End If
And then it is uploaded to the FTP.
I want to know, how I upload the multiple pages with ADF scanner?
How I detect whether the Scanner is FLATBED or ADF?
And How I create a single TIFF file, if I scanned 100 pages?
Please specify the code.
Thanks,
Umesh
Scan documents with ADF Scanner...
Moderator: Alex
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Scan documents with ADF Scanner...
Hello Umesh,
http://www.vintasoft.com/vstwain-dotnet ... fWithoutUi
Best regards, Alexander
Your code has logical mistake, here is correct code:I want to know, how I upload the multiple pages with ADF scanner?
Code: Select all
Dim oImageMemoryStream as memorystream
If bFirstImage Then
oImageMemoryStream = VSTwain.GetImageAsStream(0, ImageFileFormat.TIFF)
bFirstImage = False
Else
VSTwain.SaveImageToStream(0, oImageMemoryStream, ImageFileFormat.TIFF)
' Next line of code is not necessary because it removes previously saved images
' oImageMemoryStream = VSTwain.GetImageAsStream(0, ImageFileFormat.TIFF)
End If
Please read description of the FlatbedPresent and FeederPresent properties in the documentation.How I detect whether the Scanner is FLATBED or ADF?
Please read the description of the SaveImage method and see this FAQ:And How I create a single TIFF file, if I scanned 100 pages?
http://www.vintasoft.com/vstwain-dotnet ... fWithoutUi
Best regards, Alexander
-
- Posts: 20
- Joined: Thu Dec 31, 2009 1:27 pm
Re: Scan documents with ADF Scanner...
Thanks Alexy.
But I have the problem, when I scanned multiple images and upload it to the FTP.
Suppose I placed 2 pages into ADF scanner, acquired it and finally upload the file to the FTP.
I get the first image scanned correctly, but the second image is the copy of first image .
Actually getting the result 2 pages with the content of the first page.
Since I'm using VintaSoftTwain.NET SDK v6.0
Please give your suggestions.
But I have the problem, when I scanned multiple images and upload it to the FTP.
Suppose I placed 2 pages into ADF scanner, acquired it and finally upload the file to the FTP.
I get the first image scanned correctly, but the second image is the copy of first image .
Actually getting the result 2 pages with the content of the first page.
Since I'm using VintaSoftTwain.NET SDK v6.0
Please give your suggestions.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Scan documents with ADF Scanner...
What value of the MaxImages property do you use?I get the first image scanned correctly, but the second image is the copy of first image.
You should use the code below if value of the MaxImages property is greater 1:
Code: Select all
If bFirstImage Then
oImageMemoryStream = VSTwain.GetImageAsStream(VSTwain1.NumImages - 1, ImageFileFormat.TIFF)
bFirstImage = False
Else
VSTwain.SaveImageToStream(VSTwain1.NumImages - 1, oImageMemoryStream, ImageFileFormat.TIFF)
End If