Removing the password from a PDF file
These all assume that you know the password.
ghostscript
gs -dNOPAUSE -dBATCH -q -sDEVICE=pdfwrite -sPDFPassword=PASSWORD -sOutputFile=OUTPUT.pdf -f INPUT.pdf
qpdf
qpdf -PASSWORD -decrypt INPUT.pdf OUTPUT.pdf
pdftk
pdftk INPUT.pdf input_pw PASSWORD OUTPUT.pdf
or, to put the password in the command prompt:
pdftk INPUT.pdf input_pw PROMPT OUTPUT.pdf
You may also like:
- Rotating all pages in a PDF document (pdftk)
- Fixing a UniFi controller where the admin user cannot log in
- Removing pages from a PDF with pdftk
- A year with password manager bitwarden
- A quick and dirty approach to redacting PDFs on Debian 11 Bullseye
- Do you still buy or watch DVDs or Blu-Ray discs? Why?