I am using PDFBox to determine pdf file is password protected or not. this is my code:
boolean isProtected = pdfDocument.isEncrypted();
My file properties is in sceenshot.
Here i am getting isProtected= true
even i can open it without password.
Note: this file has Document Open password : No and permission password : Yes.