Merging and encrypting PDF with Ghostscript

Recently I needed to merge several PDF files into a single file and also encrypt it. So after some googling, here my recipe:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOwnerPassword=password1 -sUserPassword=password2 -dKeyLength=128 -dEncryptionR=3 -sOutputFile=output.pdf input1.pdf input2.pdf input3.pdf


Comments

Popular posts from this blog

Repairing Roomba charging circuit

VirtualBox Hardware Virtualization and Nested Paging

Fixing USB audio controller (CM108) for headphones