PdfSaveOptionsPermissions Property |
Gets or sets the operations that are allowed to a user on an encrypted PDF document.
Namespace:
GemBox.Document
Assembly:
GemBox.Document (in GemBox.Document.dll) Version: 29.0.35.1122
Syntaxpublic PdfPermissions Permissions { get; set; }
Public Property Permissions As PdfPermissions
Get
Set
Property Value
Type:
PdfPermissions
The operations that are allowed to a user on an encrypted PDF document.
Remarks
Generated PDF document will be encrypted if any of the following conditions are satisfied:
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 example.
See Also