2

Install tools for crypt and decrypt pdf file:

sudo apt install -y pdftk

Crypt a pdf file with it:

pdftk inputfile.pdf output outputfile.pdf user_pw mypass

Now i have to input mypass to open the outputfile.pdf with some pdf viewer,delete the inputfile.pdf.

Try to decrypt the already crypted file outputfile.pdf with pdftk:

pdftk outputfile.pdf output decrypt.pdf user_pw mypass
Error: Failed to open input PDF file: 
   outputfile.pdf
   OWNER OR USER PASSWORD REQUIRED, but not given
Errors encountered.  No output created.
Done.  Input errors, so no output created.
1
  • use qpdf instead.
    – Eric
    Nov 25, 2023 at 4:21

1 Answer 1

1

You need to provide the “input password”:

pdftk inputfile.pdf input_pw mypass output outputfile.pdf

user_pw is used for the output only.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .