My Canon scanner seems to ignore the device.AutoDiscardBlankPages property
When your device.Identity.Manufacturer is Canon:
* Use custom cap 0x8001 to enable/disable auto blank page detection
* Use custom cap 0x8076 to set threshold for blank page (default is 10%)
The scanner manufacturer (Canon) chooses implement their AutoDiscardBlankPages differently than the TWAIN specification provides. (They are likely doing this so they can provide additional control over HOW the scanner defines a "blank page"... something the TWAIN specification doesn't address).
So, instead of reading the TWAIN standard AutoDiscardBlankPages property, Canon uses the TWAIN specification's Custom Code space to create their own
(bool) CAP_0x8001 - auto discard on/off
(int) CAP_0x8076 - auto discard threshold
(?) CAP_0x801e - ??
You see, the TWAIN specification is not "tightly policed" ... while the spec is very clear in requirements, there's no licensing body that tests compliance... so every scanner device maker and driver writer is free to implement however much or little of the spec they wish, yet can still call their device a TWAIN device.
Atalasoft actually sits on the TWAIN board of directors... we've made very strong efforts to be as 100% TWAIN compliant as we possibly can be. The Custom capabilities are part of the TWAIN spec (in terms of how to get/set them) but each device maker is free to use these custom caps in any manner they wish (so long as they honor the TWAIN way of get/set and type identification
So, when Canon decided they wanted more finite control over blank page discarding, they needed extra fields other than "on/off" so, they implemented the whole feature in custom capabilites, and ignore the TWAIN standard auto discard blank pages on/off command.
So, if the device.Identity.Manufaturer name is "Canon", you should use those custom codes for the discard instead of the TWAIN way (you can still set the TWAIN setting for the auto discard, it just won't honor it if it's Canon).
Be aware though - CAP0x8001, 0x8076, and 0x801e could be assigned to completely different things by other manufacturers (Fujitsu, Kodak, etc...) - so don't just always set this - ONLY set them if the device manufacturer contains "Canon" or else you may find that you've enabled the "halt and do a little dance" instruction.
Okay, no, not really... but my point is that those caps could be assigned to ANYTHING on another scanner manufacturer's model - the capabilities in the 0x8000 range are completely custom and each manufacturer can do what they like with them.