GM-Script-Writer-62850 / PHP-Scanner-Server

Allows you to use your Linux install as a web based scanner server thus allowing you to scan with any web enabled device; Now supports server side printing! (As of 1.4.11)
59 stars 17 forks source link

scan area to small #39

Closed ToB204 closed 7 years ago

ToB204 commented 7 years ago

Hallo and "Sorry for my English”! I have a HP scanjat 8250 and the scan works well but the scan area is to small. The maximum size for the scanner is 216mmX355mm but he scans only one area like din A6. The terminal command sudo scanimage -d "avision:libusb:001:004" -x 210 -y 297 > kopie.pnm makes a normal scan. Thanks in advance for the help!

GM-Script-Writer-62850 commented 7 years ago

May I have the output of scanimage -A -d "avision:libusb:001:004" Your English seems fine to me, I only question your use of the word "he" on line 3 of your post, "he" refers to a male human/animal, I believe you should have used "it" or "the Scanner Server"

ToB204 commented 7 years ago

The ouput is:

 All options specific to device `avision:libusb:001:004':
  Scan mode:
    --mode Lineart|Dithered|Gray|16bit Gray|Color|16bit Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --resolution 50..4800dpi (in steps of 1) [150]
        Sets the resolution of the scanned image.
    --speed 0..4 (in steps of 1) [0]
        Determines the speed at which the scan proceeds.
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --source Normal|Transparency|ADF Front|ADF Duplex [Normal]
        Selects the scan source (such as a document-feeder).
  Geometry:
    -l 0..216mm [0]
        Top-left x position of scan area.
    -t 0..355mm [0]
        Top-left y position of scan area.
    -x 0..216mm [216]
        Width of scan-area.
    -y 0..355mm [355]
        Height of scan-area.
    --overscan-top 0..4mm [inactive]
        The top overscan controls the additional area to scan before the paper
        is detected.
    --overscan-bottom 0..4mm [inactive]
        The bottom overscan controls the additional area to scan after the
        paper end is detected.
    --background-lines 0..50pel [inactive]
        The background raster controls the additional background lines to scan
        before the paper is feed through the scanner.
  Enhancement:
    --brightness -100..100% (in steps of 1) [0]
        Controls the brightness of the acquired image.
    --contrast -100..100% (in steps of 1) [0]
        Controls the contrast of the acquired image.
    --quality-scan[=(yes|no)] [yes]
        Turn on quality scanning (slower but better).
    --quality-cal[=(yes|no)] [yes]
        Do a quality white-calibration
    --gamma-table 0..255,... [inactive]
        Gamma-correction table.  In color mode this option equally affects the
        red, green, and blue channels simultaneously (i.e., it is an intensity
        gamma table).
    --red-gamma-table 0..255,...
        Gamma-correction table for the red band.
    --green-gamma-table 0..255,...
        Gamma-correction table for the green band.
    --blue-gamma-table 0..255,...
        Gamma-correction table for the blue band.
    --exposure 0..1000% (in steps of 1) [100]
        Manual exposure adjustment.
    --infra-red[=(yes|no)] [no]
        Enable infra-red scan mode.
    --multi-sample[=(yes|no)] [no]
        Enable multi-sample scan mode.
  Scan mode:
    --frame 0..0 [inactive]
        Selects the number of the frame to scan
    --power-save-time <int> [71]
        Allows control of the scanner's power save timer, dimming or turning
        off the light.
    --message <string> [] [read-only]
        This text contains device specific options controlled by the user on
        the scanner hardware.
    --nvram-values <string> [Vendor: HP      
Model: C9930A          
Firmware: 1.03
Manufacturing date: 8224-8224-8224
First scan date: 2053-8224-8197
Flatbed scans: 184812544
Pad scans: 2155
ADF simplex scans: 825110579] [read-only]
        Allows access obtaining the scanner's NVRAM values as pretty printed
        text.
    --paper-length[=(yes|no)] [inactive]
        Newer scanners can utilize this paper length to detect double feeds. 
        However some others (DM152) can get confused during media flush if it
        is set.
    --flip-page[=(auto|yes|no)] [inactive]
        Tells page-flipping document scanners to flip the paper back to its
        original orientation before dropping it in the output tray.  Turning
        this off might make scanning a little faster if you don't care about
        manually flipping the pages afterwards.

P.s. and thanks for the English lesson ;-)

GM-Script-Writer-62850 commented 7 years ago

As best I can tell it seems like your issue is you don't have a way to scan the size you want to and a full scan is too much, have you use the paper manager yet? Once you have it detect paper sizes you will be able to scan any paper size within the size limits of your scanner

papermanager

ToB204 commented 7 years ago

I have this already tried but unfortunately no success. Here I have the output of the debug console at a scan:

www-data@192.168.2.79:/home/www-data/php-scanner$ lsusb -d '03f0:0b01' # See Bug #13
Bus 001 Device 004: ID 03f0:0b01 Hewlett-Packard ScanJet 82x0C
www-data@192.168.2.79:/home/www-data/php-scanner$ scanimage -d 'avision:libusb:001:004' --source 'Normal' -l 0 -t 0 -x 215.9 -y 330.2 --resolution 50 --mode '16bit Color' --format=pnm > '/tmp/scandir0/scan_file0.pnm'
The output of this command unfortunately has to be suppressed to prevent errors :(
Run `sudo -u www-data scanimage -d 'avision:libusb:001:004' --source 'Normal' -l 0 -t 0 -x 215.9 -y 330.2 --resolution 50 --mode '16bit Color' --format=pnm > '/tmp/scandir0/scan_file0.pnm'` for output info
www-data@192.168.2.79:/home/www-data/php-scanner$ convert '/tmp/scandir0/scan_file0.pnm' -scale '450x471' 'scans/thumb/Preview_0_Feb_2_2017~11-46-43.jpg'

www-data@192.168.2.79:/home/www-data/php-scanner$ convert '/tmp/scandir0/scan_file0.pnm' -alpha off 'scans/file/Scan_0_Feb_2_2017~11-46-43.png'

And an picture of the scanner setting: scanner

GM-Script-Writer-62850 commented 7 years ago

Assuming this still gives you the wrong size scanimage -d 'avision:libusb:001:004' --source 'Normal' -l 0 -t 0 -x 215.9 -y 330.2 --resolution 50 --mode '16bit Color' --format=pnm > kopie.pnm how about this: scanimage -d 'avision:libusb:001:004' --source 'Normal' -l 0 -t 0 -x 216 -y 330 --resolution 50 --mode '16bit Color' --format=pnm > kopie.pnm Maybe your unit has a problem with decimal values If that works i will add some rounding options somewhere

For now if that works i would just add a new paper size in the paper manager or edit the paper.json file in the config folder manually

ToB204 commented 7 years ago

I've found the problem. There is a bug at the 50 Dpi resolution, Scan is working at all other resolution. It is possible to remove the 50 dpi resolution?

GM-Script-Writer-62850 commented 7 years ago

You can edit config/scanners.json manually

ToB204 commented 7 years ago

Thanks for the help and the great php scanner server !!!!

GM-Script-Writer-62850 commented 7 years ago

That file will revert if you scan for scanners please be sure you report that issue to the sane project so it can be fixed