DFencryptpdf — Protect a PDF file by encrypting it with the specified password
DFencryptpdf
{
[-c password]
| [-C]
}
[-i string]
[-o string]
PDF supports password protection beginning with version 5.0 of Acrobat Reader and version 1.4 of the PDF standard. A PDF document has at least two levels of password: the owner password (which permits the owner to perform actions that another user cannot) and the user password. Since PDF is typically a plain text format, a password protected PDF document is encrypted and stored in binary format. The owner/user password is used as a salt for the encryption.
For DFdiscover purposes, the password is needed to ensure that the document can only be opened and read by known users (those with the password). Since DFdiscover supports delivery of study data/reports by PDF and email, it makes sense that the PDF document be protected from viewing by an unintended recipient. The password is not intended to limit what a user with the password can do with the document, so the owner and user password are the same and no restrictions are applied to any one of the actions available on the document.
DFencryptpdf returns zero upon success,
otherwise returns one. DFencryptpdf may fail if the input PDF file
is invalid PDF, has multiple cross-reference tables, such as
linearized or updated PDF files, or is already encrypted. If neither
-c nor -C
is specified, it also returns an error.
-c password, -C |
If
The password file |
-i string | The name of the input PDF file that will be encrypted. If no input file is specified, DFencryptpdf reads from standard input. |
-o string | The name of the encrypted output PDF file. If no output file is specified, DFencryptpdf writes to standard output. DFencryptpdf will exit with an error if the input filename and output filename are the same. |
DFencryptpdf exits with one of the following statuses:
0 | The command was successful. |
1 | The command failed because the required command-line arguments were not present or were incorrectly specified, the input file could not be read, or the output file could not be created/written. |