Dynamic Web TWAIN: How to detect whether the scanner has actually finished scanning?

When you scan multiple pages, you might want to process the images right after all pages have been scanned. In this case, you can use the event OnPostAllTransfers which is trigged after all pages have been scanned and transferred.

Code Snippet

function btnScan_onclick() 
  {
    DWObject.SelectSource();
    DWObject.OpenSource(); 
    DWObject.MaxImagesInBuffer = 4;
    DWObject.IfFeederEnabled = true;
    DWObject.IfAutoFeed = true;
    DWObject.AcquireImage();
  }
    //trigged after all transfers end 
    DWObject.RegisterEvent("OnPostAllTransfers", function () {
    alert("Scanning has finished.");
  });
Is this page helpful?

Leave a Reply

Your email address will not be published.