Many PDF processing programs such as pdfunite cannot do well with encrypted PDF. So we can use qpdf to decrypt first.
So it can be done like this:
qpdf --decrypt 'PATH-TO-MY-PDF-FILE.pdf' --replace-input
That is it.
Have fun; be free!