I have an encrypted pdf, and I am aware of the password, and I would like to use the Ghostscript to make them unencrypted, so they don't require any password to be opened.
I tried using the following, But it seems I'm doing something wrong
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -c .setpdfwrite -f -sUserPassword=mypassword encrypted.pdf