Table of Contents

Class PdfEncryptionOptions

Namespace
PdfEngine.Vector.Security
Assembly
PdfEngine.Vector.dll

How to protect a copy. Passwords are prepared (SASLprep for AES-256) and never stored beyond the write.

public sealed class PdfEncryptionOptions
Inheritance
PdfEncryptionOptions
Inherited Members

Properties

AllowInvalidatingSignatures

A rewrite breaks every digital signature; it is refused unless the caller has confirmed that.

public bool AllowInvalidatingSignatures { get; init; }

Property Value

bool

CurrentOwnerPassword

For a document that is already encrypted: its permissions password, unless it was opened with it.

public string? CurrentOwnerPassword { get; init; }

Property Value

string

EncryptMetadata

False leaves the XMP metadata stream readable (for search engines and indexers).

public bool EncryptMetadata { get; init; }

Property Value

bool

OwnerPassword

The permissions password, which lifts the restrictions and allows changing the security. When empty the open password doubles as it, which is only allowed with no restrictions.

public string? OwnerPassword { get; init; }

Property Value

string

Permissions

public PdfPermissionSet Permissions { get; init; }

Property Value

PdfPermissionSet

Strength

public PdfEncryptionStrength Strength { get; init; }

Property Value

PdfEncryptionStrength

UserPassword

The open password; null or empty opens the document without one (permissions still apply).

public string? UserPassword { get; init; }

Property Value

string