Click or drag to resize
Pdf Library for .NET

PdfSecurityInfo Class

The security settings of a PDF document as it was loaded into a PdfSecurityManager: its encryption, its permissions and the signatures it carries. Returned by GetSecurityInfo.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfSecurityInfo

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public class PdfSecurityInfo

The PdfSecurityInfo type exposes the following members.

Properties
 NameDescription
Public propertyAlgorithmGets the encryption algorithm. Meaningful only when IsEncrypted is true.
Public propertyCanAccessibilityCopyContentGets a flag indicating if content can be extracted for accessibility.
Public propertyCanAssembleDocumentGets a flag indicating if pages can be inserted, rotated or deleted.
Public propertyCanCopyContentGets a flag indicating if content can be copied.
Public propertyCanEditAnnotationsGets a flag indicating if annotations can be added or changed.
Public propertyCanEditContentGets a flag indicating if the content can be changed.
Public propertyCanFillFormFieldsGets a flag indicating if form fields can be filled in.
Public propertyCanFullQualityPrintGets a flag indicating if the document can be printed at full quality.
Public propertyCanPrintGets a flag indicating if the document can be printed.
Public propertyCertificationLevelGets the changes the certification allows; None when the document is not certified.
Public propertyIsCertifiedGets a flag indicating if the document is certified (its first signature is a certification).
Public propertyIsEncryptedGets a flag indicating if the document is encrypted.
Public propertyIsMetadataEncryptedGets a flag indicating if the XMP metadata is encrypted with the document.
Public propertyIsOwnerPasswordRequired Gets a flag indicating if the owner password is needed for full access to the document: the document is encrypted and at least one permission is denied.
Public propertyIsSignedGets a flag indicating if the document carries at least one signature.
Public propertyIsUserPasswordRequiredGets a flag indicating if a password is needed to open the document (it has a user password).
Public propertyKeyLengthGets the encryption key length in bits; 0 when the document is not encrypted.
Public propertyKeySizeGets the encryption key size. Meaningful only when IsEncrypted is true.
Public propertyPermissionFlagsGets the raw permission flags of an encrypted document (the P entry of the encryption dictionary, ISO 32000); -1 (every permission) when the document is not encrypted.
Public propertyRevisionGets the revision of the security handler (2 to 6); 0 when the document is not encrypted.
Public propertySecurityHandlerGets the name of the security handler (normally Standard); empty when the document is not encrypted.
Public propertySignatureCountGets the number of signatures the document carries.
Top
Example
PdfSecurityManager manager = new PdfSecurityManager();
manager.Load("document.pdf", "password");
PdfSecurityInfo info = manager.GetSecurityInfo();
if (info.IsEncrypted)
    System.Console.WriteLine(info.Algorithm + " " + info.KeyLength + "-bit");
System.Console.WriteLine("signatures: " + info.SignatureCount);
manager.Close();
See Also