Giter VIP home page Giter VIP logo

phpsane's Issues

Feature request: multiple pages document to PDF scanning

I propose a feature to scan to (multi-page?) PDF, with a simple option of 'add another page?'

If I'm not wrong current implementation of sane does not support PDF but I have used the 'hack' below successfully (by piping to ps2pdf)

scanimage -p --resolution 250 --mode Gray -x 210 -y 297 | pnmtops -imageheight 11.7 -imagewidth 8.3 | ps2pdf - output.pdf

and then pdfunite *.pdf multipage.pdf to merge pages into a single multi-page PDF document.

Minor error with German language

In German language the incl/menu.php tries to access a $lang key which has not been defined.
In incl/language.php keys 62 and 63 are missing and should be append to the dict as such:

        "Flachbett",                            // 62
        "ADF",                                  // 63

pdf page size

Hello, sorry to bother you.
If I scan a page or pages to pdf the page size results smaller. I can maintain correct page size (A4) only if I set the resolution at 75dpi. If I set a bigger resolution then the page size get smaller proportionally

here the command line printed at the bottom of phpsane page:

at 75 dpi

/usr/bin/scanimage -d "hpaio:/usb/HP_LaserJet_Professional_M1132_MFP?serial=000000000QH702AQSI1c" -l 0mm -t 0mm -x 210mm -y 296.926mm --mode "Gray" --resolution 75dpi --brightness 6 --contrast 6 --source Flatbed | /usr/bin/convert - -compress jpeg -quality 100 -density 75 pdf:- > './output/scan_2020-11-06_11.40.55.pdf'

and at 150dpi

/usr/bin/scanimage -d "hpaio:/usb/HP_LaserJet_Professional_M1132_MFP?serial=000000000QH702AQSI1c" -l 0mm -t 0mm -x 210mm -y 296.926mm --mode "Gray" --resolution 150dpi --brightness 6 --contrast 6 --source Flatbed | /usr/bin/convert - -compress jpeg -quality 100 -density 150 pdf:- > './output/scan_2020-11-06_11.41.33.pdf'

page size in scan options is always set to A4.

can you help me please?
thank you

Resolution not ajustable when choosing "source" with hpaio (HP Deskjet 3050)

Hi,
I am not thaaat deep into SANE and do not know what is the exact way of using it.
But as phpSane scanned all documents with my hpaio HP Deskjet 3050 in resolution 75 dpi although offering 100, 200, 300, ... in the list, I found a solution:

# This command, generated by phpSane, will always result in 75 dpi scans ignoring the --resolution:
scanimage -d "hpaio:/usb/Deskjet_3050_J610_series?serial=CN12E3B12V05HX" -l 0mm -t 0mm -x 210mm -y 296.926mm --mode "Color" --resolution 200 --brightness 1000 --contrast 1000 --source Flatbed

# This command (without --source Flatbed) will just work perfectly:
scanimage -d "hpaio:/usb/Deskjet_3050_J610_series?serial=CN12E3B12V05HX" -l 0mm -t 0mm -x 210mm -y 296.926mm --mode "Color" --resolution 200 --brightness 1000 --contrast 1000

Solution:
With phpSane I managed to make it work by just setting do_source = false; in incl/config.php.
However I do not know if this still is a bug of phpSane's usage of scanimage or if the bug is located in scanimage/SANE itself?!

Best, APi

PS: By the way: Now phpSane works like a charm, combined with SANEdroid on smartphone and an old lazy Raspberry Pi Model B I have the perfect print&scan station now without any stupid outdated HP drivers nor apps.

pdf page size

Hello, sorry to bother you.
If I scan a page or pages to pdf the page size results smaller. I can maintain correct page size (A4) only if I set the resolution at 75dpi. If I set a bigger resolution then the page size get smaller proportionally

here the command line printed at the bottom of phpsane page:

at 75 dpi

/usr/bin/scanimage -d "hpaio:/usb/HP_LaserJet_Professional_M1132_MFP?serial=000000000QH702AQSI1c" -l 0mm -t 0mm -x 210mm -y 296.926mm --mode "Gray" --resolution 75dpi --brightness 6 --contrast 6 --source Flatbed | /usr/bin/convert - -compress jpeg -quality 100 -density 75 pdf:- > './output/scan_2020-11-06_11.40.55.pdf'

and at 150dpi

/usr/bin/scanimage -d "hpaio:/usb/HP_LaserJet_Professional_M1132_MFP?serial=000000000QH702AQSI1c" -l 0mm -t 0mm -x 210mm -y 296.926mm --mode "Gray" --resolution 150dpi --brightness 6 --contrast 6 --source Flatbed | /usr/bin/convert - -compress jpeg -quality 100 -density 150 pdf:- > './output/scan_2020-11-06_11.41.33.pdf'

page size in scan options is always set to A4.

can you help me please?
thank you

US page sizes not listed, even if uncommented

I'm running this on apache2 2.4.38 and PHP v7.4.

In incl/config.php, if I uncomment the

add_page_size('US Letter', 216, 279);
add_page_size('US Legal', 216, 356);
add_page_size('US Ledger', 432, 279);
add_page_size('US Tabloid', 279, 432);

lines, they don't show up in the drop down menu for "Page Size". I've set the $DEFAULT_PAGE_SIZE = 'US Letter'; it comes up as Custom in the drop down list. all the other A sizes do show up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.