PDFBox returns isEncrypted true even if i can open file
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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. 回答1: Your PDF has an empty user password and a non empty owner password. And yes, it is encrypted. This is being done to prevent people to do certain things, e.g. content copying. It isn't a real security; it is the