We occasionally receive pdf files with blank/empty passwords. We use pdftk and under these circumstances it fails. We have tried:
pdftk input.pdf input_pw output output.pdf
pdftk input.pdf input_pw \ output output.pdf
pdftk input.pdf input_pw '' output output.pdf
pdftk input.pdf input_pw "" output output.pdf
All fail indicating that we have supplied an incorrect password, however this command works great when the password consists of actual characters. We were hoping that quotes or a \ escaping would trick it, but no love. We found a workaround with qpdf and are going to use that for now, but was hoping someone out there could crack this nut.
You can also export an encrypted PDF file from Libre Office (File -> Export as PDF -> Security tab -> Set Passwords -> Set open password), if necessary importing your existing PDF into the Draw program first.
According to this hashcat forums post, the qpdf tool might work for this purpose.
qpdf in.pdf out.pdf --decrypt --password=''
And it looks like you've tried all of the command-line ways to try to pass an empty string to pdftk (and my testing had the same results), so there may be no way to do this with pdftk at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With