VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

WPF C# - Scanning several images via ADF



WPF C# - Scanning several images via ADF

Post by chrisi »

Hello,

First i want to mention that I am currently using the evaluation version!

I am working on a project where i want to scan several images via ADF and save each image in a own file!
For this I acquire Images synchroniously and save the acquired image to C://... .bmp as following code shows:
case AcquireModalState.ImageAcquired:
    imageIndex++;
    string _url = @"C:\document_" + imageIndex + ".bmp"; 
                        
    TwainBmpEncoderSettings encoderSettings = new TwainBmpEncoderSettings();
    SelectedDevice.AcquiredImage.SaveToFile(_url, encoderSettings );

    // dispose acquired image
    SelectedDevice.AcquiredImage.Dispose();
                        
    // output current state
    response += string.Format("Document is saved to: {0}", _url);
    break;
...
Problem: When I start the acquiring process the scanner (Brother MFC L27000DW) is scanning all images but there is only one file saved with the first image in it!

Is there something wrong in my code or does this problem may concerns to the Scanner?

Thanks for help!


Re: WPF C# - Scanning several images via ADF

Post by Alex »

Hello,

Your code looks correct but I cannot say more because I do not see all your code.

Old TWAIN drivers of Brother scanners scan all pages from ADF but return only the last image if UI is disabled:
https://www.vintasoft.com/forums/viewtopic.php?f=19&t=3

Maybe you have such "old" TWAIN driver? If yes, try to update your driver.

Best regards, Alexander


Re: WPF C# - Scanning several images via ADF

Post by chrisi »

Hej Alex,

I tried to update the driver and now it works fine!

Thanks for your response.


Page 1 from 1: 1