[TWAIN] Avision AD230U scanner: cannot set autodiscard_blank_pages option
Way to reproduce:
Try to scan with autodiscard_blank_page=-1.
Result: The driver gives an invalid constraint for this option. There should be two possible values (-2, -1). As the result, Libinsane cannot set it.
C:\personal\golang\lisgo\bin>lisgo32 print-options -d "twain:Avision:AD230U" -s feeder -o autodiscard_blank_pages=-1
Qt: Untested Windows version 10.0 detected!
⨯ libinsane error error=../subprojects/libinsane/src/workarounds/cache.c:L229(cache_set_value): autodiscard_blank_pages->set_value() failed: 0x40000003, Invalid value
⨯ libinsane error error=../subprojects/libinsane/src/util.c:L244(lis_set_option): feeder: Failed to set autodiscard_blank_pages=-1
------- autodiscard_blank_pages ------
autodiscard_blank_pages (autodiscard_blank_pages;autodiscard_blank_pages)
Caps: 8 [LisCapSwSelect]
Type: 1 (Integer)
Units: 0 (None)
Constraint: List (-2)
Value: -2
Expected result:
No errors, image is returned with blank pages skipped.
Additional info:
Scanner report: https://openpaper.work/fr/scanner_db/report/445.
If I set "LIBINSANE_WORKAROUND_CHECK_CAPABILITIES=0"
before initializing lis_api then it works.
Environment:
Windows 10