Namespace: PdfSharp.Pdf.Security
Encapsulates access to the security settings of a PDF document.
public sealed class PdfSecuritySettings
Inheritance Object → PdfSecuritySettings
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 { internal get; set; }
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; }
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; }
Permits printing the document. Should be used in conjunction with PermitFullQualityPrint.
public bool PermitPrint { get; set; }
Permits modifying the document.
public bool PermitModifyDocument { get; set; }
Permits content copying or extraction.
public bool PermitExtractContent { get; set; }
Permits commenting the document.
public bool PermitAnnotations { get; set; }
Permits filling of form fields.
public bool PermitFormsFill { get; set; }
Permits to insert, rotate, or delete pages and create bookmarks or thumbnail images even if PermitModifyDocument is not set.
public bool PermitAssembleDocument { get; set; }
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; }
Determines whether the document can be saved.
internal bool CanSave(String& message)
message
String&
Returns true if there are permissions set to zero, that were introduced with security handler revision 3.
public static bool HasPermissionsOfRevision3OrHigherSetTo0(uint permission)
permission
UInt32
The permission uint value containing the PdfUserAccessPermission flags.