[sane-devel] ADF support in SANE API

m. allan noah kitno455 at gmail.com
Mon Jun 29 13:44:59 BST 2020

On Sun, Jun 28, 2020 at 7:09 PM Alexander Pevzner <pzz at apevzner.com> wrote:
> > So my question is: What can I do in order to monitor ADF status? Call sane_start() after setting an empty
> > scan region, so the scan is done at the first call to sane_read()? This is obviously not an option, as in the
> > case of a loaded feeder this would consume the first original rather than just read ADF status.
> > Cancel the scan immediately after sane_start() using sane_cancel()? I have no idea whether this is possible.
> There are actually no such API that will return ADF status before actual
> scan attempt.

This is not exactly true. Several sane backends present read-only
options which report the status of various hardware sensors.
Unfortunately, these options are generally inconsistent between
backends. A few of them do have an option called "page-loaded", which
should be used for this purpose. Look for SANE_NAME_PAGE_LOADED in the
source, you will find them.

"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

More information about the sane-devel mailing list