How do I password protect a pdf document?

I have been sent one of those dreadful .pdf documents. I need to save it as 'password protected' how do I do that in LibreOffice? There's lots of information on creating a password protected pdf document but I can find nothing on password protecting an existing .pdf.


You can do this with pdftk. It is a powerful command line tool to manage PDFs.

pdftk source.pdf output destination.pdf user_pw password

At the command line

qpdf --encrypt test123 test123 40 -- input.pdf doc_with_pass.pdf

Where test123 is both the user and owner password, the next value is for encryption key-length which may be 40, 128, or 256.

To decrypt the pdf file you can use the following

qpdf --password=test123 --decrypt doc_with_pass.pdf doc_without_pass.pdf