Dynamsoft Document Imaging SDKs
http://forums.dynamictwain.com/

Duplex Scanning not Working Correctly
http://forums.dynamictwain.com/duplex-scanning-not-working-correctly-t5223.html
Page 1 of 1

Author:  gsteimer [ Tue Mar 02, 2010 2:41 pm ]
Post subject:  Duplex Scanning not Working Correctly

Hi,

I'm trying to set up a test scan application to test the API features of the ActiveX control. When duplex is off, the application correctly scans the document. However, when I turn duplex scanning on, it only scans the back of the image. It does not correctly place two pages in the buffer. Here's the JavaScript code I'm using to scan the image:

function btnScan_onclick()
{
var dwt = document.getElementById("DynamicWebTwain1");
var srcDD = document.getElementById("scanSource");
var duplexCB = document.getElementById("duplexEnabled");

//setup the scan properties
dwt.CloseSource();
dwt.SelectSourceByIndex(srcDD.selectedIndex.value)
dwt.OpenSource();

//setup duplex scanning if supported by the scanner
alert("duplex: " + dwt.Duplex);
if( dwt.Duplex > 0 )
{
dwt.IfDuplexEnabled = duplexCB.checked;
}

alert("is duplex enabled?: " + dwt.IfDuplexEnabled);

//start the scan
dwt.AcquireImage();
}

The first alert writes out "Duplex: 1" and the second one shows IfDuplexEnabled to be true.

Am I missing something that makes the control execute a duplex scan? The odd thing is that when the TWAIN Driver (32) control pops up, it already has ADF (Duplex) set in the scan type dropdown.

Thanks!

George

Author:  Vincy [ Tue Mar 02, 2010 8:49 pm ]
Post subject:  Re: Duplex Scanning not Working Correctly

Hi George,

To get multiple images into the control, you need to set the value of MaxImagesInBuffer to the image number you want to scan (the default value of MaxImagesInBuffer is 1). For more info, please refer to:
http://www.dynamsoft.com/help/TWAIN/Web ... Buffer.htm

Here is the modified code for you:

Code:
dwt.SelectSourceByIndex(srcDD.selectedIndex.value)
dwt.OpenSource();

dwt.MaxImagesInBuffer = 4;
...
dwt.AcquireImage();


Quote:
The odd thing is that when the TWAIN Driver (32) control pops up, it already has ADF (Duplex) set in the scan type dropdown.

The default settings are decided by the driver of your scanner. You can set the value of IfShowUI to false to disable the user interface of the source, so you can control Duplex by the checkbox as you designed.

Thanks.

Author:  gsteimer [ Wed Mar 03, 2010 8:33 am ]
Post subject:  Re: Duplex Scanning not Working Correctly

That worked great, thanks! I'm guessing the MaxImagesInBuffer property is used to control the memory usage on the client...

One question though - what if you don't know the number of pages that a user is going to scan? Is there a way to dynamically set that property, or do you just have to set it to a sufficiently large number to try to accommodate the majority of documents?

Thanks,

George

Author:  Vincy [ Wed Mar 03, 2010 9:29 am ]
Post subject:  Re: Duplex Scanning not Working Correctly

Hi George,

Thanks for the update. I’m glad to hear that it works.

The MaxImagesInBuffer property is used to set the maximum number of images that can be held in buffer. You can set it to a sufficiently large number according to your needs.

In Dynamic Web TWAIN 5.* or earlier versions, the trial version of Dynamic Web TWAIN can hold 4 images in buffer at most and the full version can hold up to 1024 images.

In Dynamic Web TWAIN 6.0, both trial and full versions of Dynamic Web TWAIN can hold 1024 images in buffer.

In Dynamic Web TWAIN 6.1, both trial and full versions of Dynamic Web TWAIN can hold 4096 images in buffer.

Thanks.

Author:  nandy1234 [ Thu Dec 21, 2017 3:01 am ]
Post subject:  Re: Duplex Scanning not Working Correctly

Hello,


Can you please give me any suggestion for increasing Multi-page scanning performance?

Scanning microfilm

Author:  Vincy [ Thu Dec 21, 2017 11:41 pm ]
Post subject:  Re: Duplex Scanning not Working Correctly

Hi Nandy1234,

May I know more details about the multi-page scanning performance you are referring to?

Hope to hear from you soon.

Regards,

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/