Thank you for the input.
I'm redoing phpsane. I'll look at the others but I came up with a method
that seems to work a little better then I have seen so far. Like I
to allow me to watch the image as it is being pulled. I am pulling the
selection interface I saw on phpsane. I talked to the developer of phpsane
and he suggested I rebuild it. I can successfully pull scanner specific
options and create a custom option list for them. I'll add the option to
stop and try it out. But I will caution other users on that. I will cache
options and scanner returns to speed things up.
Post by Jeff Post by Jeff Sadowski
I am developing a php interface I'm calling it php saneng I have it on
bitbucket for now and using proc_open. I will send the signal via
You are not the first. Have you looked at
https://github.com/anomen-s/php-sane or https://github.com/sbs20/scanserv ?
I should probably point a few things before you continue down the dark
path of making a wrapper around scanimage.
When I started writing gscan2pdf back in 2006, it was exactly that, a
Gtk2 wrapper around scanimage, written in Perl.
It seemed like a good idea to wrap scanimage at the time, but it quickly
became clear that the problem is that you have no way of handling option
reloads. You can make it work for one scanner easily enough, but in a
general sense, it is impossible.
You are completely at the whim of the backend if an option, e.g. source
or depth, option force a reload. And they do, which changes unexpected
things. For instance some scanners support one page size (i.e. scan
size) for flatbed, and another for ADF.
You can work around this by calling scanimage [extra options] --help
every time the user changes an option, but this will be slow. You can
make it quicker by caching the options, but this is error-prone.
You will find that because of this, the order in which the options are
set is vitally important. i.e. for the above example, you have to set
the source option before the geometry options, as the range of geometry
options is changed by source. And confusingly, some backends have
different names for the same options.
In the end, I wrote Perl bindings for the SANE API. This solved all of
However, it is non-trivial. Here is a tutorial on writing PHP extensions
Unsubscribe: Send mail with subject "unsubscribe your_password"