pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Change Owner Password

This command changes the password which is also known as the set permissions password or the master password. Have a look at some examples.

Usage

pdfcpu changeopw inFile opwOld opwNew [ outFile ] [flags]

Common Flags


Arguments

namedescriptionrequired
inFilePDF input file, use - to read from stdinyes
opwOldcurrent owner passwordyes
opwNewnew owner passwordyes, must not be empty!
outFilePDF output file, use - to write to stdoutno

Examples

You have to set the owner password when you encrypt a file and you can change it anytime later with changeopw.

Change the owner password:

$ pdfcpu encrypt enc.pdf --opw opw
writing enc.pdf ...

$ pdfcpu changeopw enc.pdf opw opwNew
writing enc.pdf ...

Change the owner password for a streamed PDF and upload the result:

$ aws s3 cp s3://acme-legal/client.pdf - \
   | pdfcpu changeopw --upw "$UPW" - "$OLD_OPW" "$NEW_OPW" - \
   | aws s3 cp - s3://acme-legal/client-rotated-opw.pdf