I have a file in server and on a button click i need to directly send it to printer.

I have a file in server and on a button click i need to directly send it to printer.

  
I have a file in server and on a button click i need to directly send it to printer , i know i have to download it first and the run a print command but i hav eto perform this on a single button click.
Any one has any idea?
Pramod -

That is never going to happen, Web browsers are designed to have security that does not allow this kind of behavior.

J.Ja
Thanks Justin for quick reply..
let me make it more clear i have file name and file contents in the database and i know i have to download the file contents on the client machine and after that i can send it to the printer ..for example lets assume i have downloaded the file at client machine by clicking in a link now i want to send it to the printer without raising any other event (button or link click) , iahve to retain the file format while printing like docx or pdf.
Hi Justin ,
One more thing can i open the downloaded document immidiatly after it gets downlaoded as if the first case doesnt work i would try to convince them to use this way.
Pramod -

You have NO control over the printer, and if you send a file to the client, you have NO control over how their web browser handles it. They will be given the same "Save File or Open?" dialog that they get with any other file download. If they choose to save it, you cannot tell their system to open it. If they choose to open it, you cannot tell their system to print it.

These restrictions are all in place for security reasons and there is nothing you can do to work around it.

J.Ja