Vikas, the important point to understand is that when using HTTP/HTML you can't do this. Your server has little control over the client's computer, certainly not enough to even know if a printer is attached. At best you can use JavaScript to prompt the client if they wish to print something.
If you really need to do something such as automatically print documents, you will need to use a technology that lets you.
Java Web Start is a great place to start, it lets you run full-blown Java applications on the client's computer.