Click here to Skip to main content
16,017,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi
please help me:

I want call scanner in my web page.and save documents in my DB.
what do I do?
Posted
Updated 1-Sep-16 5:39am
Comments
[no name] 31-Jul-12 14:57pm    
Reading the documentation for your scanner would be a good start.
Sandeep Mewara 31-Jul-12 15:03pm    
Discussed with the people whose scanner you bought? Or any reference material?
Kenneth Haugland 31-Jul-12 15:13pm    
Why dont you create a web page were you could load up documents, and save thouse? That the documents came from a scanner is irellevant. No?
veusk 31-Jul-12 15:22pm    
in my page I have a bottun for scan, when user click on, the scaner start scanntig and save them to my DB
I want work in this way.
please help me
Sergey Alexandrovich Kryukov 31-Jul-12 16:19pm    
What do you mean by "call scanner"? "Hey, scanner!" -- it won't make it work. You can only call a method/function/procedure/property/operator...
--SA

Well, the only way any ASP.NET code is going to see the scanner is if it is connected to the IIS server you're website is being hosted on.

The only way a scanner is going to work connected to a browser client is if you have an ActiveX control or a Java application running in the web page and the clients browser security settings are relaxed. By default, web browsers do not allow interaction with the machine resources, such as hardware devices (read: scanners), the system registry, file system, ...
 
Share this answer
 
Comments
veusk 31-Jul-12 16:00pm    
ok,thanks,but I dont know about ActiveX ,and how can i use it in my web??
Sergey Alexandrovich Kryukov 31-Jul-12 16:45pm    
It's the best not to use it, really.
--SA
Dave Kreskowiak 31-Jul-12 18:57pm    
Just the fact that your asking that question tells me you don't have the skill set to complete this little project.

ActiveX was a name given to COM-based components that could be loaded into a web page. The problem with doing that is, back in the day, those COM components could be used to do harm to the client computer and have been frowned upon ever since. Internet Explorer is the only browser that supports it any more.

The bottom line is this: Client-side hardware devices and web applications do not go together! Your choice of making a web application to solve the client requirements is a bad one!
Sergey Alexandrovich Kryukov 31-Jul-12 16:46pm    
Absolutely, my 5. I forget this is ASP.NET. I credited your answer is mine.
--SA
Normally, your scanner should support either TWAIN, WIA or SANE API (or, pretty unlikely, ISIS). Please see:
http://en.wikipedia.org/wiki/TWAIN[^],
http://en.wikipedia.org/wiki/Windows_Image_Acquisition[^],
http://en.wikipedia.org/wiki/Scanner_Access_Now_Easy[^],
http://en.wikipedia.org/wiki/Image_scanner#Applications_Programming_Interface[^].

Please see the scanner documentation to learn what is supported. A number of Open-source libraries exist to allow you to use the API in C#. Do your search after you learn what is required and can be used with your scanner. When you learn it, do the search using CodeProject, StackOverflow, Google or Bing.

[EDIT]

If forget this is ASP.NET. Dave is absolutely right. You really need to connect a scanner to each client system, for those who have scanners, but a Web application does not have access to the client's computer, by apparent safety reasons. This ActiveX is dirty stuff, only supported by IE and is very unsafe. I would avoid it by any means. I would highly prefer that the users worked with their only scanners by themselves and only uploaded the images. After all, if a user own a scanner, she or he has some software to use it, right? I would hate the idea of having some Web application controlling my scanner, from a standpoint of both user and developer.

—SA
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900