Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a printer.I required authentication mechanism for users to that relevant printer.

once they try to print word, excel and pdf.. documents it must ask user name and password. please help me..... please give me a code for that , if you have...

:(
Posted
Comments
David_Wimbley 13-Jan-13 1:57am    
What stack are you using? Asp.net? Winforms? WPF? This is some helpful info. I asked my magic 8 ball and it asked me to please try again.

If you can let us know i might be able to throw a sample together but in the time being what you would have to do is the following.

1) Have button or some trigger to send the desired file to printer
2) Have form popup asking for credentials
3) If credentials are good then send the file to the printer silently, i gave sample of how to do this with PDF here: http://www.codeproject.com/Answers/497800/CodeplusForplusPrintingplusMultipleplusPDFplusFile#answer1
tiggerc 14-Jan-13 11:21am    
You can do this if you setup a Windows network correctly, this will allow you to limit the printers that people can print to etc.

Alternatively if I understand you correctly, you wish to to write a handler for windows printing and when the user tries to print you want to ask for a username and password? ( This option is fairly difficult and requires manipulating Windows ) I certainly don't have any code you can have as that is not what this site is about, you haven't even provided anything that you have tried.

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