Sometimes you get PDF files which have password on them. You know the password right now but want to store those files in your archive and don't want to remember their passwords. One way to do it is using the tool called qpdf
qpdf --decrypt --password="<your-password-goes-here>" "<input-file-name>" --replace-input
Note: This will replace your existing input file, so please make a copy of the file before running this command. If you want to store the output in a different file then use below command:
qpdf --decrypt --password="<your-password-goes-here>" "<input-file-name>" "<output-file-name>"
References: Carlos Delgado