Table of Contents

Class PdfSecuritySettings

Namespace
PdfSharp.Pdf.Security
Assembly
PdfSharp.dll

Encapsulates access to the security settings of a PDF document.

public sealed class PdfSecuritySettings
Inheritance
PdfSecuritySettings
Inherited Members

Properties

HasOwnerPermissions

Indicates whether the granted access to the document is 'owner permission'. Returns true if the document is unprotected or was opened with the owner password. Returns false if the document was opened with the user password.

public bool HasOwnerPermissions { set; }

Property Value

bool

IsEncrypted

Returns true, if the standard security handler exists and encryption is active.

public bool IsEncrypted { get; }

Property Value

bool

OwnerPassword

Sets the owner password of the document. Setting a password automatically sets the PdfDocumentSecurityLevel to PdfDocumentSecurityLevel.Encrypted128Bit if its current value is PdfDocumentSecurityLevel.None.

public string OwnerPassword { set; }

Property Value

string

PermitAnnotations

Permits commenting the document.

public bool PermitAnnotations { get; set; }

Property Value

bool

PermitAssembleDocument

Permits to insert, rotate, or delete pages and create bookmarks or thumbnail images even if PermitModifyDocument is not set.

public bool PermitAssembleDocument { get; set; }

Property Value

bool

PermitExtractContent

Permits content copying or extraction.

public bool PermitExtractContent { get; set; }

Property Value

bool

PermitFormsFill

Permits filling of form fields.

public bool PermitFormsFill { get; set; }

Property Value

bool

PermitFullQualityPrint

Permits to print in high quality. insert, rotate, or delete pages and create bookmarks or thumbnail images even if PermitModifyDocument is not set.

public bool PermitFullQualityPrint { get; set; }

Property Value

bool

PermitModifyDocument

Permits modifying the document.

public bool PermitModifyDocument { get; set; }

Property Value

bool

PermitPrint

Permits printing the document. Should be used in conjunction with PermitFullQualityPrint.

public bool PermitPrint { get; set; }

Property Value

bool

UserPassword

Sets the user password of the document. Setting a password automatically sets the PdfDocumentSecurityLevel to PdfDocumentSecurityLevel.Encrypted128Bit if its current value is PdfDocumentSecurityLevel.None.

public string UserPassword { set; }

Property Value

string

Methods

HasPermissionsOfRevision3OrHigherSetTo0(uint)

Returns true if there are permissions set to zero, that were introduced with security handler revision 3.

public static bool HasPermissionsOfRevision3OrHigherSetTo0(uint permission)

Parameters

permission uint

The permission uint value containing the PdfUserAccessPermission flags.

Returns

bool