Open a pdf with blank password with pdftk
Asked Answered
J

1

14

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.

Jacey answered 28/3, 2016 at 20:24 Comment(0)
C
11

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.

Capsulate answered 19/11, 2017 at 0:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.