yes im using java for my program, and i use two library to process the pdf (icepdf-viewer-4.3.3.jar and icepdf-core-4.3.3.jar).
if i using this code (see picture 1) i can use it normally.
but when I want to open PDF which has an open password automatically (the password is set into the program) I even experience problems (the picture 2 is on next reply).
Since you are already using the SwingController a securityCallback handler is already setup for you, there should be no need to sit it directly on the doucment class.
When the file is opened in the viewer there should be a dialog that will show up to allow the user to type in a password. You are using a pretty old version of the library which may not support the documents encryption level. I would recommend updating to at least version 5, current is 6.3.x.
If you have a publicly viewable test file, I can try it and let you know if there is any problems decrypting the file.