nextcloud-scanner icon indicating copy to clipboard operation
nextcloud-scanner copied to clipboard

Limit the number of options provided by SANE backends

Open e-alfred opened this issue 5 years ago • 6 comments

We should limit the amount of options provided by the SANE backends as there are a lot of different options depending on the device/backend and many are rather obscure and have no purpose for our app.

Currently the most important generic options should be:

  • Mode (Color/Grayscale/Lineart)
  • Resolution in DPI
  • Size of file to scan including visual selection from preview

If there are any other generic options available on all backends we should include them if they are useful for the user.

e-alfred avatar Apr 23 '19 15:04 e-alfred

@e-alfred Only the mentioned params are now whitelisted. However, the basic architecture is already in place to allow per-backend whitelists in the future

Biont avatar Jun 12 '19 13:06 Biont

On second thought, I'd prefer to let the REST API return the full capabilities of the backends and implement the whitelist in Javascript. I would think that this is a more flexible approach since you could still use the REST endpoint for arbitrary stuff and you could easily show&hide scan parameters dynamically in case you need them.

But let's not let that become a blocker for the next release. We can change that later just as well

Biont avatar Jun 13 '19 16:06 Biont

Turned out to be a very easy and quick change. Adding a simple "Show all parameters" should be trivial as well, but let's go easy for the moment

Biont avatar Jun 14 '19 12:06 Biont

This is a good idea, so any user who wants to use some additional features of their scanner/backend can try them out if they need it. A simple warning that these features are untested could be added to warn them that not everything might work as expected.

e-alfred avatar Jun 15 '19 08:06 e-alfred

and scanner selector

example

$ scanimage -L
device `hpaio:/net/hp_laserjet_cm1415fn?ip=192.168.1.100&queue=false' is a Hewlett-Packard hp_laserjet_cm1415fn all-in-one
device `hpaio:/net/officejet_pro_7740_series?ip=192.168.1.102&queue=false' is a Hewlett-Packard officejet_pro_7740_series all-in-on
e

v-sim avatar Oct 12 '19 12:10 v-sim

There is already rudimentary support for multiple backends in the vuejs branch (but commented out IIRC)

I really need to get back to work on this project :sleepy:

Biont avatar Oct 12 '19 13:10 Biont