0
votes

I am using the following java code which uses the com4j to call the WIA for scanning. The scanner is EPSON DS-510.

This code seems to work for fine for scanning sigle side but when I set the WIA_DPS_DOCUMENT_HANDLING_SELECT to 5 (for duplex + feeder) and run the scan, the line with the statement cmndlg.showTransfer or item.transfer both errors out with not enough storage.

I have the latest driver and this is on windows 10. The same code works fine for any fujitsu scanners.

setDeviceProperty(device, WIA_DPS_DOCUMENT_HANDLING_SELECT, 5);
IItem item = device.items(1);
String filename;
if (itemProps != null) {
    setProperties(item, itemProps);
}
Com4jObject com4jObject;
if (showTransferDialog) {
   com4jObject = (Com4jObject) cmndlg.showTransfer(item, imageFormatId, false);
} else {
    com4jObject = (Com4jObject) item.transfer(imageFormatId);
}
IImageFile imageFile = com4jObject.queryInterface(IImageFile.class);

Any ideas ?

1

1 Answers

0
votes

When you receive such an error you can quickly run the task manager or process explorer to see what is the amount of memory your application is consuming. I had come across the error "not enough storage" once when I was working with extrapolation, where the DIB size was relatively huge and we were requesting for memory but apparently windows has a hard limit of maximum memory that can be given to a process. So the checklist would be:

1) If disk space is sufficiently enough for high resolutions images, check with single scan. 2) Single scan has no issues try high resolution. If works fine duplex scan for low resolution images. 3) If all the above works fine, you need to verify what is the amount of memory requested by the minidriver for scanning these images.