Unlock a pdf using cmd line

Sometimes you need to access a pdf which is password protected.

We can use qpdf to remove the password.

sudo apt install qpdf
qpdf --decrypt locked.pdf unlocked.pdf