Click or drag to resize
PdfSaveOptionsPermissionsPassword Property
Specifies the password for opening the encrypted PDF document without any access restrictions.

Namespace: GemBox.Document
Assembly: GemBox.Document (in GemBox.Document.dll) Version: 25.3.30.1213
Syntax
public string PermissionsPassword { get; set; }

Property Value

Type: String
The password for opening the encrypted PDF document without any access restrictions.
Remarks

Generated PDF document will be encrypted if any of the following conditions are satisfied:

  • Permissions is different than All.
  • PermissionsPassword is not or Empty.
  • DocumentOpenPassword is not or Empty.

Both PermissionsPassword and DocumentOpenPassword are optional but with the following consequences:

  • If Permissions is different than All and PermissionsPassword is not specified, component will generate random PermissionsPassword.
  • Using PermissionsPassword, also known as owner password, without DocumentOpenPassword is not secure. It relies on PDF viewer software to respect specified restrictions, but it may choose not to do so.
  • Using DocumentOpenPassword, also known as user password, is potentially very secure. It or PermissionsPassword is required for decrypting and viewing the document.
  • When DocumentOpenPassword is specified, PDF viewer application will prompt for password to decrypt and present the document. If entered password is DocumentOpenPassword, document will be decrypted and presented with specified Permissions enforced. Otherwise, if entered password is PermissionsPassword, document will be decrypted and presented without any restrictions.

DocumentOpenPassword and PermissionsPassword cannot be equal, otherwise exception is thrown.

For more information, see PDF Encryption sample.

See Also