sbs20 / scanservjs

SANE scanner nodejs web ui
https://sbs20.github.io/scanservjs/
GNU General Public License v2.0
768 stars 146 forks source link

Printer can scan Letter and Legal via ADF (and Flatbed) but paper sizes not showing in UI #723

Open necromancyr opened 7 months ago

necromancyr commented 7 months ago

Letter and legal paper sizes, for some reason, aren't coming up in the UI. The reported paper sizes ARE able to scan letter and legal (devices.json below). It's an Canon Mf644CDW, w/ADF, so it's definitely able to scan full size pages (especially via the ADF vs. flatbed).

Tried going through to see what the potential cutoffs are, but the below max sizes should accommodate letter and legal, so not certain where to reconfigure/adjust things to make it work. (Or if there's some other config option I need to set to even have them appear).

All options specific to device `escl:http://192.168.X.X:XX':
--mode Gray|Color [Gray]
 Selects the scan mode (e.g., lineart, monochrome, or color).
    --resolution 300dpi [300]
        Sets the resolution of the scanned image.
    --source Flatbed|ADF|ADF Duplex [Flatbed]
        Selects the scan source (such as a document-feeder).
    -l 0..213.275mm [0]
        Top-left x position of scan area.
    -t 0..352.891mm [0]
        Top-left y position of scan area.
    -x 2.70932..215.985mm [215.985]
        Width of scan-area.
    -y 2.70932..355.6mm [355.6]
        Height of scan-area.
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --preview-in-gray[=(yes|no)] [no]
        Request that all previews are done in monochrome mode.  On a
        three-pass scanner this cuts down the number of passes to one and on a
        one-pass scanner, it reduces the memory requirements and scan-time of
        the preview.
    --brightness 1969591872..32766 (in steps of 1989903840) [inactive]
        Controls the brightness of the acquired image.
    --contrast 5236..1988491891 (in steps of 5236) [inactive]
        Controls the contrast of the acquired image.
    --sharpen 1..7 (in steps of 1) [4]
        Set sharpen value.
    --threshold 21845..1969591952 (in steps of 32766) [inactive]
        Select minimum-brightness to get a white point
necromancyr commented 7 months ago

Think I figured it out. Basically, 215.9mm is a more accurate measurement of Legal/Letter width, but 216mm is the common rounded up number/width. For legal, height is 355.6mm, but many places have it rounded up to 356mm. May be worth having the more specific numbers in the config as it seems some scanners report they can EXACTLY FIT Letter/Legal.

(I'm going to do a config override per https://github.com/sbs20/scanservjs/issues/552 for now and hope it works).