Faisal ,
You have 2 permissions types to access a PDF, each has his own password :
Owner & User.
The Owner can do all the operations in the PDF, so as Adam said your problem
may be because you are accessing the PDF as the owner, that's why you can
still print it.
Adam ,
Isn't it a bug that should be added to PDFBox that if we have an Encrypted
PDF that we want to decrypt, then save it decrypted. I guess this is a
normal demand, but as I mentioned before, it causes the
NullPointerException.
Best regards ,
Hesham