Open connorb777 opened 1 year ago
Odd.
To answer your specific question, this recipe should help you.
So the app is running:
/usr/bin/scanimage -d hpaio:/usb/hp_LaserJet_3030?serial=00CNBM002126 --source Auto --mode Color --resolution 100 -l 0 -t 0 -x 228.6 -y 381 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif
Which results in
Error: /usr/bin/scanimage -d hpaio:/usb/hp_LaserJet_3030?serial=00CNBM002126 --source Auto --mode Color --resolution 100 -l 0 -t 0 -x 228.6 -y 381 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif exited with code: 1, stderr: scanimage: setting of option --br-x failed (Invalid argument)
The scanner is reporting:
Apr 24 21:35:04 raspberrypi server.js[10934]: ' Geometry:\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' --length-measurement Unknown|Unlimited|Approximate|Padded [Padded]\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' Selects how the scanned image length is measured and reported, which\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' is impossible to know in advance for scrollfed scans.\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' -l 0..228.6mm [0]\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' Top-left x position of scan area.\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' -t 0..381mm [0]\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' Top-left y position of scan area.\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' -x 0..228.6mm [228.6]\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' Width of scan-area.\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' -y 0..381mm [381]\n' +
Apr 24 21:35:04 raspberrypi server.js[10934]: ' Height of scan-area.\n' +
So on the face of it, everything "should" just work.
Anyway, you've verified that it's definitely the decimal that's doing it? What do these do?
/usr/bin/scanimage -d hpaio:/usb/hp_LaserJet_3030?serial=00CNBM002126 --source Auto --mode Color --resolution 100 -l 0 -t 0 -x 228.5 -y 381 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif
/usr/bin/scanimage -d hpaio:/usb/hp_LaserJet_3030?serial=00CNBM002126 --source Auto --mode Color --resolution 100 -l 0 -t 0 -x 227.6 -y 381 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif
/usr/bin/scanimage -d hpaio:/usb/hp_LaserJet_3030?serial=00CNBM002126 --source Auto --mode Color --resolution 100 -l 0 -t 0 -x 228 -y 381 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif
Hello. Same problem with a HP3052 . Preview option gives me the same error as the op. The scanimage -A show the geometry as 228.6 .
Try geometry commands: original 228.6 : error with the 228.5 : works nice with 227.6 : works nice with 228: works nice
I install hplip in docker image to access the scanner.
Describe the bug Default scan dimensions cause invalid parameter error when attempting to preview. This seems to be the result of the default x dimension being 228.6, since scanning regularly works fine with whole numbers, but I can't figure out where I should go to change this.
To Reproduce Steps to reproduce the behavior:
Expected behavior Scanner scans a preview
Screenshots![image](https://user-images.githubusercontent.com/28076082/234168717-e98bcf50-ec21-43b0-b240-0d5ac732e594.png)
Client (please complete the following information):
Server (please complete the following information):
Logs https://pastebin.com/ZzxgbLQX
Additional context