next up previous contents index
Next: Decrypting a Document Up: Encryption and Decryption Previous: Introduction   Contents   Index

Encrypting a Document

To encrypt a document, the user and owner passwords must be given (here, fred and charles respectively):
\begin{framed}
\small\verb!cpdf -encrypt 40bit fred charles -no-print in.pdf -o...
...1.5mm}
\small\verb!cpdf -encrypt AES fred '''' in.pdf -o out.pdf!
\end{framed}
In addition, the usual method can be used to give the existing owner password, if the document is already encrypted. A blank user password is permissible. In this event, PDF viewers will typically not prompt for a password for operations allowable with the user password.

When using AES encryption, the option is available not to encrypt the metadata. Add -no-encrypt-metadata to the command line.



root 2008-12-01