Click here to Skip to main content
13,096,268 members (50,814 online)
Rate this:
Please Sign up or sign in to vote.
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 12-Jan-13 18:25pm
Plyswthsqurles 13-Jan-13 1:57am
What stack are you using? 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:
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 13 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100