Merge Two PDF to Single Encrypted PDF

Problem

I have unprotected

  1. input1.pdf
  2. input2.pdf

and I want to create one single encrypted.pdf.

My try

I looked up QPDF’s manual and tried the following command.

qpdf --empty --pages input{1,2}.pdf --encrypt upw opw 256 -- encrypted.pdf

but I got this error.

qpdf: unrecognized argument --encrypt (pages options must be terminated with --)

For help:
  qpdf --help=usage       usage information
  qpdf --help=topic       help on a topic
  qpdf --help=--option    help on an option
  qpdf --help             general help and a topic list

Solution

The sentence inside the parentheses says it all.

qpdf --empty --pages input{1,2}.pdf -- --encrypt upw opw 256 -- encrypted.pdf
PDF  QPDF 

No comment

Your email address will not be published. Required fields are marked *.