Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview ignores Width and Height constraints #716

Open
diresi opened this issue Feb 26, 2024 · 1 comment · May be fixed by #717
Open

Preview ignores Width and Height constraints #716

diresi opened this issue Feb 26, 2024 · 1 comment · May be fixed by #717

Comments

@diresi
Copy link

diresi commented Feb 26, 2024

The Preview command ignores width/height constraints and uses defaults instead, which cause my Epson Expression Home XP-342 to abort with

scanimage: sane_start: Operation was canceled

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Scan'
  2. Edit Width and Height and set some non-defaults
  3. Click on 'Preview'
  4. Check server logs for actual "scanimage" command line, here it reports ... -x 218.4 -y 299.7 ... regardless of Width and Height settings in the UI:
spawn: '/usr/bin/scanimage -d utsushi:esci:usb:04b8:1115 --mode Color --resolution 100 -l 0 -t 0 -x 218.4 -y 299.7 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif

Expected behavior
Use width and height as provided in UI.

Client (please complete the following information):

  • Chromium
  • Version 122.0.6261.69 (Official Build) Arch Linux (64-bit)

Server (please complete the following information):

  • OS: Arch Linux
  • Node version 21.6.2
  • NPM version 10.4.0
  • Docker version n/a (installed from AUR)

Logs

 [2024-02-26T19:55:20.026Z] INFO (Process): {
  spawn: '/usr/bin/scanimage -d utsushi:esci:usb:04b8:1115 --mode Color --resolution 100 -l 0 -t 0 -x 218.4 -y 299.7 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif'
}
[2024-02-26T19:55:20.957Z] INFO (Http): { method: 'GET', path: '/api/v1/preview' }
[2024-02-26T19:55:20.960Z] INFO (Process): { spawn: 'convert - -resize 868x1191! jpg:-' }
[2024-02-26T19:55:21.955Z] INFO (Http): { method: 'GET', path: '/api/v1/preview' }
[2024-02-26T19:55:21.958Z] INFO (Process): { spawn: 'convert - -resize 868x1191! jpg:-' }
[2024-02-26T19:55:22.073Z] ERROR (Http): Error: /usr/bin/scanimage -d utsushi:esci:usb:04b8:1115 --mode Color --resolution 100 -l 0 -t 0 -x 218.4 -y 299.7 --format tiff --brightness 0 --contrast 0 -o data/preview/preview.tif exited with code: 2, stderr: scanimage: sane_start: Operation was canceled
    at ChildProcess.<anonymous> (/usr/share/webapps/scanservjs/server/classes/process.js:85:18)
    at ChildProcess.emit (node:events:519:28) 
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
diresi added a commit to diresi/scanservjs that referenced this issue Feb 26, 2024
@diresi diresi linked a pull request Feb 26, 2024 that will close this issue
@diresi
Copy link
Author

diresi commented Feb 26, 2024

#717 works for me, but it's mostly used to demonstrate my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant