Reputation: 31
How can I invoke a paper scanner using php code?
I have already used Dynamic Web TWAIN for scanning, but it is not free.
I need an open source code to scan.
Please help me. Thank you in advance.
Upvotes: 3
Views: 14873
Reputation: 1323
I was in a similar position as you and found there were 0 open-source libraries.
Thus, I created a library https://github.com/spacemudd/webagent-scanner.
What you need to do:
python setup.py py2exe
app.exe
. This will create a localhost web server w/ port 8087.Upvotes: 1
Reputation: 3434
PHP is a server side language and cannot interact with client side hardware. You can use a web-based TWAIN SDK to scan documents in your PHP app. Check out this article which might help: http://www.dynamsoft.com/blog/document-imaging/how-to-scan-documents-in-php
You can also use Scanner.js: https://github.com/Asprise/scannerjs.javascript-scanner-access-in-browsers-chrome-ie.scanner.js
Maybe you can try phpSANE: https://sourceforge.net/projects/phpsane/
phpSANE is a web-based frontend for SANE written in HTML/PHP so you can scan with your web-browser. It also supports OCR.
PHP Printer library: https://github.com/mike42/escpos-php
Upvotes: 2