AutoDocumentFeed_for_WIA icon indicating copy to clipboard operation
AutoDocumentFeed_for_WIA copied to clipboard

Not picking documents from ADF, only scans flatbed.

Open mtorroella opened this issue 7 years ago • 7 comments

Currently using an HP ScanJet Enterprise Flow 7500 under Windows 7. I load the ADF with documents (the green led indicadtor turns on) but when I click the Scan button it only scans from flatbed.

Any ideas ?

mtorroella avatar Jan 29 '18 14:01 mtorroella

hi,

unfortunately for many years this project was hosted on codeplex and there were far many failures or dd exceptions from different hardware.

So sadly it may just be a hardware thing We could try and figure it out.

I don't have your hardware so, would be great if you could set a breakpoint on this line and see if it manages to detect the auto feeder and then if it correctly detects if there are more pages.

Let me know. 😄

Thanks for posting 👍 . It's the only to weed out hardware issues.

gideondsouza avatar Jan 31 '18 20:01 gideondsouza

Thanks for the fast response gideondsouza. It doesn't enter to that IF statement, don't know why as it doesn't return 0.

The Convert.ToUInt32(documentHandlingSelect.Value) returns 2 And WIA_DPS_DOCUMENT_HANDLING__SELECT.FEEDER returns 1

Also, before reaching that statement, it has already done 1 scan using flatbed. So the problem seems to be before that statement. It is clearly not detecting the ADF. However if instead of using: img = DirectCast(WiaCommonDialog.ShowTransfer(Item, wiaFormatTIFF, False), ImageFile) I use: img = WiaCommonDialog.ShowAcquireImage(WIA.WiaDeviceType.ScannerDeviceType, WiaImageIntent.ColorIntent) And choose manually the ADF, it works fine (but only scans 1 sheet)

mtorroella avatar Feb 01 '18 11:02 mtorroella

hey thanks for the updates.

And choose manually the ADF What do you mean by this? on your printer itself or an interface on the os?

I wonder if you could change it so that hasMorePages is always true and it attempts trying to get more scans? what if you tried this?

gideondsouza avatar Feb 03 '18 01:02 gideondsouza

What do you mean by this? on your printer itself or an interface on the os?

The interface of wiaaut.dll library. When you use WiaCommonDialog.ShowAcquireImage instead of ShowTransfer it prompts a quick wizard allowing you to choose Flatbed/ADF, Page Size (if ADF is selected), Color/Gray, etc.

I wonder if you could change it so that hasMorePages is always true and it attempts trying to get more scans?

It always tries to scan with Flatbed when using ShowTransfer .

mtorroella avatar Feb 05 '18 08:02 mtorroella

yea it's been over 5 years i used this in production. I'm going to try and try to emulate some hardware or look into the WIA lib but it'll take sometime, especially because I barely use windows now! Meanwhile if you find something that works please let me know,

gideondsouza avatar Feb 11 '18 13:02 gideondsouza

Sure I will. I've paused the project for a while (can't spend more time on it). They will use the assistant while I don't find a solution to make it dialog-less.

mtorroella avatar Feb 13 '18 08:02 mtorroella

I appreciate that this issue is old, however I'm looking to be able to scan multi-page documents using an ADF and am looking at this library. Using the library as is, it will only scan documents from the flatbed. The only way I can make it use the Document Feeder is by adding the following code just after connecting to the scanner:

int docSrc = 1 // 1 = Document Feeder, 2 = Flatbed.

foreach (Property prop in WiaDev.Properties) { if (prop.PropertyID == WIA_PROPERTIES.WIA_DPS_DOCUMENT_HANDLING_SELECT) { prop.set_Value(docSrc); break; } }

However, I only get the first page of the documents I trying to scan. It throws a scanner busy error on the second iteration of the loop, however all documents feed through the scanner.

portarri avatar May 21 '21 08:05 portarri