Password Encrypt PDF operation

Encrypts a PDF document by using a password.

For information about the General and Route Evaluation property groups, see Common operation properties.

Input properties

Properties to specify a PDF document and the encryption parameters.

Input PDF

A document value that represents the PDF document to encrypt.

If you provide a literal value, clicking the ellipsis button  opens the Select Asset dialog box. (See About Select Asset.)

Encryption Options

A Password Encryption Option Spec value that specifies encryption settings. If you provide a literal value, specify the following options.

Compatibility:
Specifies the compatibility with earlier versions of Acrobat and Adobe Reader. The following values are valid.
  • Acrobat 3.0 And Later: Compatible with Acrobat 3 and later versions that provide 40-bit encryption.

  • Acrobat 5.0 And Later: Compatible with Acrobat 5 and later versions that provide 128-bit encryption.

  • Acrobat 6.0 And Later: Compatible with Acrobat 6 and later versions that provide 128-bit encryption and also a finer granularity of control over what operations are permitted.

  • Acrobat 7.0 And Later: Compatible with Acrobat 7 and later versions that provide Advanced Encryption Standard (AES).

  • Acrobat 9.0 And Later: Compatible with Acrobat 9 and later versions that encrypt PDF documents by using FIPs compliant AES 256 algorithm.

The default is Acrobat 5.0 And Later.

All Document Contents:
Select to encrypt the entire PDF document, including its attachments and metadata.

All Contents Except Metadata:
Select to encrypt all PDF document resources except for its metadata. This option is available only when Acrobat 6.0 And Later, Acrobat 7.0 And Later, or Acrobat 9.0 And Later is selected for the Compatibility option.

Attachments Only:
Select to encrypt only PDF document attachments. This option is available only when Acrobat 7.0 And Later or Acrobat 9.0 And Later is selected for the Compatibility option.

Document Open Password:
The string value that represents the password required to open a password-encrypted PDF document.

If you do not specify a value for the open password, users are not prompted for the open password value when opening the PDF document in Adobe Reader or Acrobat. However, users are prompted for the permission password value when they attempt to change settings in Acrobat or when removing encryption from the PDF document.

The value of the Document Open Password property must be different than the value of the Permissions Password property. If these properties are the same, an exception is thrown when the operation executes.

Restrict Edit Of Security Settings:
Determines whether permissions password is used. When selected, the Permissions Password, Printing Allowed, and Changes Allowed options can be modified. Otherwise, no permissions password can be specified, and defaults for the Printing Allowed and Changes Allowed options are used.
  • Permissions Password: The password value that is required to modify permissions on the document or remove encryption.

    If you specify a null value for the permission password, users are prompted for the open password value when opening the PDF document in Adobe Reader or Acrobat. However, users are not prompted for the permission password value when they attempt to change settings in Acrobat or when removing encryption from the PDF document. The value of the Permissions Password property must be different than the value of the Document Open Password property. If these properties are the same, an exception is thrown when the operation executes.

  • Printing Allowed: The permission that specifies whether printing is allowed. The default is High Resolution. The following values are valid.

  • None: Specifies that printing of the PDF file is not allowed.

  • High Resolution: Specifies that printing of the PDF is permitted in high resolution.

  • Low Resolution (150 dpi): Specifies that printing of the PDF file is permitted in low resolution up to 150 dpi.

  • Changes Allowed: The changes that are allowed on the PDF document. The default is Any Except Extracting Pages. The following values are valid.

  • None: No changes are permitted on the encrypted PDF file.

  • Inserting, Deleting, And Rotating Pages: Only inserting text, deleting, and rotating the page layout is permitted.

  • Form Fill And Sign Signature Fields: Only filling in fields and digitally signing the PDF file is permitted.

  • Comments, Form Fill And Sign Signature Fields: Only adding comments, filling in the fields in the PDF file, and digitally signing the PDF file is permitted.

  • Any Except Extracting Pages: All editing of a PDF file is permitted except for extracting PDF pages from the document.

Output properties

Property to specify a PDF document that was encrypted using a password.

Output PDF

The location to store the PDF document that was encrypted using a password. The data type is document.

Exceptions

This operation can throw an EncryptionServiceException exception.