Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Help Please!!

I have a c# web application that communicates with a web service, the front-end application takes a unique number(staff number), month, and year from the user and retrieve payslip information from the database, generate a pdf file and dumps the employee information on the pdf file.

The pdf file is password protected, when you open the pdf file the password you provide is compared to one of the fields in the database.

Now my problem is: if you access the application as an administrator you can download payslips for other employees, now I have to add a checkbox which gives the administrator the option to tell the downloaded pdf file whether to require password or not. If the checkbox is checked the pdf file must require password else password must not be required, am stark on this part and I don't know how to go about in adding this functionality. Help!
Posted
Updated 13-Aug-13 23:41pm
v2
Comments
Sushil Mate 14-Aug-13 6:10am    
So where you stuck? just ask for password when user clicks on checkbox & at the time of pdf download option create pdf with that password. isn't that simple?
Thando Khumalo 14-Aug-13 6:16am    
Code to do that will make it simple, for now nope!
Sushil Mate 14-Aug-13 6:17am    
what code? to create password protected PDF? you need to explain more.
Thando Khumalo 14-Aug-13 6:20am    
PDF is already password protected, code to tell the application that if the checkbox is checked the PDF must NOT required the password.
Sushil Mate 14-Aug-13 6:27am    
application which has check box in it is desktop application & you want to download the pdf from web server through web service? is that you saying?

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