I want to check if a pdf file is password protected or not to view. That is i want to know if the pdf file has user password or not.
I found some help in some forum
Reference : Check for Full Permission
You should be able to just check the property PdfReader.IsOpenedWithFullPermissions.
PdfReader r = new PdfReader("YourFile.pdf"); if (r.IsOpenedWithFullPermissions) { //Do something }