pdfcpu

A PDF processor written in Go.

View the Project on GitHub hhrutter/pdfcpu


Changelog

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

usage: pdfcpu changeopw [-v(erbose)|vv] [-upw userpw] inFile opwOld opwNew


Flags

name description required
verbose turn on logging no
vv verbose logging no
upw user password if set


Arguments

name description required
inFile PDF input file yes
opwOld current owner password yes
opwNew new owner password yes


Examples

You can set the owner password either when you encrypt a file or later with changeopw.

Change the owner password of a document that already has one:

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

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


Set the owner password of a document that has none. Any encrypted PDF file has either one of the two passwords set. Whenever you change the owner password of a document that has a user password set, you have to provide the current user password:

pdfcpu encrypt -upw upw enc.pdf
writing enc.pdf ...

pdfcpu changeopw enc.pdf "" opwNew
Please provide the user password with -upw

pdfcpu changeopw -upw upw enc.pdf "" opwNew
writing enc.pdf ...