PeachDrawing.PDF

PdfEncryptionOptions Class

Password protection and permissions for a generated PDF, written with the PDF standard security handler using AES-256 (revision 6 of ISO 32000-2). Older handlers (RC4, AES-128) depend on deprecated algorithms and are not offered.

public sealed class PdfEncryptionOptions

Inheritance System.Object → PdfEncryptionOptions

Remarks

Set it on Encryption. The file’s header version is raised to 1.7 when it would otherwise be older. PDF/A and PDF/X documents must not be encrypted.

Properties  
EncryptMetadata Whether the document’s XMP metadata stream is encrypted too. When false it stays readable to tools that index documents without a password. Defaults to true.
OwnerPassword The password that lifts every restriction in Permissions. When null or empty a random one is generated and discarded, so nobody can ever lift the restrictions.
Permissions The operations allowed to a person who opened the document with the user password. Defaults to All.
UserPassword The password a reader must supply to open the document. When null or empty the document opens without a password, and Permissions still apply.
Methods  
ReadOnly(string, string) Creates options for a read-only document: viewable, printable and copyable, but not editable (see ReadOnly).