PeachPDF

PeachPDF

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. It cannot be combined with PDF/A or PDF/X, both of which forbid encryption, and needs a PDF 1.7 or 2.0 document (the default is 2.0).

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).