Click or drag to resize

PdfSaveOptionsSetOneTimePasswords Method

Sets user and owner passwords and generates one-time keys for saving encrypted PDF document. Keys will be reset after usage.

Namespace:  Atalasoft.PdfDoc
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public void SetOneTimePasswords(
	SecureString userPassword,
	SecureString ownerPassword = null,
	PdfAccessPermissions permissions = PdfAccessPermissions.Default,
	bool encryptMetadata = true
)

Parameters

userPassword
Type: System.SecuritySecureString
The user password.
ownerPassword (Optional)
Type: System.SecuritySecureString
The owner password.
permissions (Optional)
Type: Atalasoft.PdfDocPdfAccessPermissions
The set of allowable actions for PDF document.
encryptMetadata (Optional)
Type: SystemBoolean
a boolean indicating that metadata stream should be encrypted. Ignored for PDF version below 2.0.
Remarks

PDF documents have two passwords associated with them, a user password and an owner password. If an encrypted document is opened by a conforming reader using the owner password, then the security Permissions are ignored. If an encrypted document is opened by a conforming reader using the user password, then the security Permissions are enforced. When a document is created with only one password or one unique password, it is considered the same as having only an owner password.

PDF/A standard does not support encryption and password-protected access permissions.

See Also