Page 1 of 1
Scanning in PHP
Posted: Mon Sep 29, 2008 11:23 am
by legible
Maybe this doesn't belong in the code section, but I'm stumped on this one.
Does anyone know of a way to access a local scanner from PHP? Basically, I need to be able to scan a document from a scanner into an PHP object (just about any image object will do). I'd prefer in straight PHP, but i doubt it's possibility, so a third party plugin will be acceptable.
Re: Scanning in PHP
Posted: Mon Sep 29, 2008 11:29 am
by onion2k
Weird, we had someone asking the same thing here a little while ago. It's a very unusual request. The answer is basically you can't.
There are a couple of options - write a PHP extension in C to access a local scanner (assuming the scanner is attached to the server that PHP is running on.. that'd be a bit strange), or to write a browser plugin that scans the document from the PC, converts it to an image, and uploads it like a file. Either way is going to be an immense amount of work. Far beyond the sort of thing you'd be able to solve with the help of some forum users. I certainly wouldn't recommend doing either.
Re: Scanning in PHP
Posted: Mon Sep 29, 2008 1:04 pm
by The_Anomaly
legible wrote:Maybe this doesn't belong in the code section, but I'm stumped on this one.
Does anyone know of a way to access a local scanner from PHP? Basically, I need to be able to scan a document from a scanner into an PHP object (just about any image object will do). I'd prefer in straight PHP, but i doubt it's possibility, so a third party plugin will be acceptable.
Just for the sake of sheer curiosity, why on earth would a web application want to use a scanner? Unless maybe it was with PHP-GTK, or whatever it's called, and you were making a desktop application--I can't even in my wildest dreams imagine why you'd use a scanner.
Re: Scanning in PHP
Posted: Mon Sep 29, 2008 1:11 pm
by legible
The_Anomaly wrote:legible wrote:Maybe this doesn't belong in the code section, but I'm stumped on this one.
Does anyone know of a way to access a local scanner from PHP? Basically, I need to be able to scan a document from a scanner into an PHP object (just about any image object will do). I'd prefer in straight PHP, but i doubt it's possibility, so a third party plugin will be acceptable.
Just for the sake of sheer curiosity, why on earth would a web application want to use a scanner? Unless maybe it was with PHP-GTK, or whatever it's called, and you were making a desktop application--I can't even in my wildest dreams imagine why you'd use a scanner.
It's for an application which requires scanning ability... I am trying to scout out the best language to do it in. Ideally, it is a desktop app distributed seamlessly (something like .Net OneClick, or Java Web Start), but I wanted to explore my options in web languages for the much easier deployment stages.
I figured PHP couldnt do it natively, or at, best, could do it with a scanner attached to the server (which doesn't really suit my needs). I have no interest in writing a browser plugin (which I suspected may work, but did not want to invest that amount of time)
But thanks for the responses! I really appreciate the help, that there isn't really a resource online that is easily found to point to most of these answers.
If anyone else has some insight on this one, I'm curious to know.