A PDF processor written in Go.
View the Project on GitHub pdfcpu/pdfcpu
This command changes the password which is also known as the set permissions password or the master password. Have a look at some examples.
pdfcpu changeopw [-upw userpw] inFile opwOld opwNew
name | description | values |
---|---|---|
v(erbose) | turn on logging | |
vv | verbose logging | |
q(uiet) | quiet mode | |
-o(ffline) | disable http traffic | |
c(onf) | config dir | $path, disable |
opw | owner password | |
upw | user password | |
u(nit) | display unit | po(ints),in(ches),cm,mm |
name | description | required |
---|---|---|
inFile | PDF input file | yes |
opwOld | current owner password | yes |
opwNew | new owner password | yes, must not be empty! |
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 -opw opw enc.pdf
writing enc.pdf ...
$ pdfcpu changeopw enc.pdf opw opwNew
writing enc.pdf ...