Forrest logo
back to the cpdf tool

cpdf:tldr:fc5a0

cpdf: Encrypt a document using 128bit encryption, providing `fred` as owner password and `joe` as user password.
$ cpdf -encrypt ${128bit} ${fred} ${joe} ${path-to-source_document-pdf} -o ${path-to-encrypted_document-pdf}
try on your machine

This command is using the cpdf (Coherent PDF Command Line Tools) tool to encrypt a PDF document with a 128-bit encryption algorithm. Here is a breakdown of the command:

  • cpdf: This is the command to invoke the cpdf tool.
  • -encrypt: This option specifies that we want to encrypt the PDF document.
  • ${128bit}: This is an argument representing the encryption strength, in this case, 128-bit encryption. It is usually a placeholder for an actual value.
  • ${fred}: This is an argument representing the user/password for accessing the encrypted PDF document. It is again a placeholder for an actual value.
  • ${joe}: This is an argument representing another user/password for accessing the encrypted PDF document. It is also a placeholder for an actual value.
  • ${path-to-source_document-pdf}: This is an argument indicating the path to the PDF document that you want to encrypt. You should replace this placeholder with the actual path to the source document.
  • -o: This option specifies the output file where the encrypted document should be saved.
  • ${path-to-encrypted_document-pdf}: This is an argument indicating the path where the encrypted PDF document should be saved. You should replace this placeholder with the actual path where you want to save the encrypted document.

In summary, this command encrypts a PDF document using 128-bit encryption with specified user/password credentials and saves the encrypted document to a specified location.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the cpdf tool