1
qpdf --password=pwd –-decrypt a.pdf b.pdf

This is failing with the following message

qpdf: unknown argument b.pdf

Password is correct and a.pdf exists. All the examples on the net has the same format.

I am running the same on ubuntu 18.04. pdftk is no more available in ubuntu 18.

gagan singh
  • 1,591
  • 1
  • 7
  • 12

3 Answers3

1

changing the order of arguments worked. not sure why?

qpdf --decrypt --password=pwd a.pdf b.pdf
gagan singh
  • 1,591
  • 1
  • 7
  • 12
0

I was facing your same issue and I'm running qpdf version 8.4.0. This is the syntax that worked for me:

qpdf inputfilename.pdf --password=mypassword --decrypt outputfilename.pdf

The first parameter after qpdf command is the input filename, the the options and as last parameter the output filename.

Federico Viotti
  • 69
  • 1
  • 3
  • 9
0

I have just had a different permutation.... OSX 10.15.3, qpdf installed using brew, qpdf version 9.1.1

needed to use: /usr/local/bin/qpdf a.pdf b.pdf --password=abc123 --decrypt

hth...