Contact us


All times are UTC - 8 hours



Post new topic Reply to topic  [ 13 posts ] 
Author Message
Offline Profile  


Joined: Thu Oct 31, 2013 4:04 am
Posts: 4
I need to scan multiple pages into one document/item. there are two scenarios: 1. a scanner with ADF or 2. a simple flad-bed scanner.
in case 1 I guess that after setting the required properties IfAutoFeed, IfFeederEnabled and MaxImagesInBuffer and then performing a 'normal' scan sequence all pages will end up in the buffer. I have not been able to test this scenario yet since I don't have an ADF scanner yet.

in case 2 i need some kind of loop that scans a page, asks user if there are more pages, wait for user to switch the paper and then scan it until user is finished and then saves the pages in the buffer in appropriate format (tiff or pdf) to the target. I have not figured out which calls triggers the appropriate actions in the loop (and which should be outside before the loop). I only get one OnPostTransfer event when i have tested.


User avatar
Offline Profile  


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1691
Hi essebtom,

Thanks for the information. Our product can satisfy your needs.

1. a scanner with ADF

Yes, as you said, you can set the property IfAutoFeed and IfFeederEnabled to true before the scan starts. If you don't have any ADF scanner at hand, you can download the virtual scanner and use ADF in the scanner interface.

BTW, we have an article talking about how to auto upload all scanned images as a multi-page file. Please refer to the link below:
http://kb.dynamsoft.com/questions/797/H ... canning%3F

2. a simple flat-bed scanner

Yes, you can write the code in the OnPostTransfer event. But I don't think it's a good idea to ask the user if there are more pages and upload the scanned images automatically if he is using a flat-bed scanner.

Users can scan the images as many as he wants, then manually click a button "upload" to save the scanned images. But the work flow is not automatical.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Offline Profile  


Joined: Thu Oct 31, 2013 4:04 am
Posts: 4
The Twain_App_mfc32.exe doesn't seem to give any oppurtunites to set ADC and the TWAIN_APP_CMD32.exe neither, at least not as a stand-alone program.


User avatar
Offline Profile  


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1691
essebtom wrote:
The Twain_App_mfc32.exe doesn't seem to give any oppurtunites to set ADC and the TWAIN_APP_CMD32.exe neither, at least not as a stand-alone program.


Actually, the apps "Twain_App_mfc32.exe" and "TWAIN_APP_CMD32.exe" are provided by TWAIN Working Group, not Dynamsoft.

If you need more information about them, you can contact TWAIN Working Group for help.

Thanks,

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Offline Profile  


Joined: Thu Nov 14, 2013 1:55 am
Posts: 4
I have tried to create a multi-page scanned document but failed.
private void dynamicDotNetTwain1_OnPostAllTransfers()
{
Stream myStream = new MemoryStream();
bool success = false;

short nr = dynamicDotNetTwain1.HowManyImagesInBuffer;
TETrace.Info("OnPostAllTransfers: " + nr);
for (short i = 0; i < nr; i++)
{
System.Drawing.Image im = dynamicDotNetTwain1.GetImage(i);

im.Save(myStream, System.Drawing.Imaging.ImageFormat.Tiff);
TETrace.Info("stream1: " + myStream.Length);
success = true;
}

The stream seems only to contain the last frame, not all of them after this.


Offline Profile  


Joined: Thu Nov 14, 2013 1:55 am
Posts: 4
P.S. - The call SaveAllAsPDFToBytes() seems to solve my problems.
The only problem left is to make the scanner to use double-sided scanning (which it is supposed to handle accordning to the manual). the Duplex property however returns false (TWDX_NONE)


Offline Profile  


Joined: Thu Nov 14, 2013 1:55 am
Posts: 4
More info: the scanner I'm testing with is a Fujitsu fi-6130z and it definitely supports duplex (double-sided) scanning. When pressing the Scan button on the scanner a dialog appears (in Windows) for fi-6130Zdj where I can choose from a number of programs to use for scanning (Windows fax and Scan Application, Scan, Arc Soft Photo Studio 6, Microsoft Word, ...). How does the scanner (driver?) know which programs are available for scanning? How do I declare my integrated dynamic .NET TWAIN program to appear in that list?
All these programs scans both sides of the papers but not when I do it in my program. What have I missed?


User avatar
Offline Profile  


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1691
Hi essebtom1,

To check if your scanner/driver supports duplex, you can try getting the value of the property after setting it like this:

Code:
dynamicDotNetTwain1.SelectSource();
dynamicDotNetTwain1.OpenSource();//You must open source before setting duplex
dynamicDotNetTwain1.IfDuplexEnabled = true;
dynamicDotNetTwain1.Duplex = 2; // 2 means 2-pass duplex
Msgbox.Show(dynamicDotNetTwain1.Duplex);
//If the result is 0, it indicates that your scanner/driver doesn't support duplex. //You can try another scanner or update your driver to the latest version.


Let me know if I can be of any help.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Offline Profile  


Joined: Thu Oct 31, 2013 4:04 am
Posts: 4
The scanner definately supports duplex (one-pass - it scans both sides of a paper in one go).
However, the docs says that the Duplex property is read-only but I'll try to set it (to 1 in this case).


Offline Profile  


Joined: Thu Oct 31, 2013 4:04 am
Posts: 4
Which is also what VSTS suggests:
this.dynamicDotNetTwain1.Duplex = Dynamsoft.DotNet.TWAIN.Enums.TWICapDuplex.TWDX_1PASSDUPLEX;
---
Error 45 Property or indexer 'Dynamsoft.DotNet.TWAIN.DynamicDotNetTwain.Duplex' cannot be assigned to -- it is read only


Offline Profile  


Joined: Thu Nov 14, 2013 1:55 am
Posts: 4
problem solved: there were two drivers from Fujitsu - WIA-fi-6130Zdj and FUJITSU fi-6130Zdj. When selecting the Fujitsu driver the Duplex property returned correct value: TWDX_1PASSDUPLEX. The WIA driver did not.


User avatar
Offline Profile  


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1691
Thanks for your update, essebtom1!

Good to know that you solved the issue, let me know if I can be of any further help. :lol:

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Offline Profile  


Joined: Thu Feb 18, 2016 1:56 am
Posts: 1
I have not been able to test this scenario yet since I don't have an ADF scanner yet.


____________
== Chess ==


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Moderators: Michael, Vincy


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Copyright © 2016 Dynamsoft | All Rights Reserved
dynamic designed by Dynamsoft team