Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Security Namespace / StandardSecurityHandlerRev3 Class
Properties Methods

In This Topic
    StandardSecurityHandlerRev3 Class Members
    In This Topic

    The following tables list the members exposed by StandardSecurityHandlerRev3.

    Public Constructors
     NameDescription
    Public ConstructorInitialize a new instance of the StandardSecurityHandlerRev3 class.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets the access type granted by this StandardSecurityHandler, or null. This property is initialized when a document is loaded. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets or sets a value indicating whether a document's content can be copied or extracted.  
    Public PropertyGets or sets a value used to determine whether content could be extracted for the purposes of accessibility.

    Note however that this restriction has been deprecated in PDF 2.0, which states that PDF readers shall ignore this bit. The default value of this property is true, and it should not be changed.

     
    Public PropertyGets or sets a value controlling how a document's content can be copied or extracted.  
    Public PropertyGets or sets a value controlling how a document can be edited.  
    Public PropertyGets or sets the length of the encryption key, in bits. The value must be a multiple of 8, in the range from 40 to 128.

    IMPORTANT NOTE: StandardSecurityHandlerRev4 can use RC4 or AES encryption, and according to specification, with RC4 any key length in the range from 40 to 128 can be used. But tests show that current/recent versions of Adobe Acrobat Reader DC and Adobe Acrobat Pro DC cannot handle files encrypted with RC4 if the key length is not equal to 128. Older versions of Acrobat Reader handle such files without issues, so it looks like a bug in the newer versions of Acrobat Reader. So it is recommended that StandardSecurityHandlerRev3 is used in cases when RC4 encryption with key length other than 128 is required.

     
    Public PropertyGets a value indicating whether the PDF has an owner password that is required to edit the document.

    This property is initialized when the document is loaded.

    Note that a document may be encrypted with an empty password, in which case HasUserPassword and HasOwnerPassword properties return false.

    Note also that, according to the PDF specification, if an owner password is not specified, then the user password should be used. GcPdf follows this rule, so if a PDF that was created using GcPdf with only a user password is loaded into GrapeCity.Documents.Pdf.GcPdfDocument, its AccessType will be AccessType.Owner, HasOwnerPassword will be true and HasUserPassword will also be true. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets a value indicating whether the PDF has a user password that is required to open the document.

    This property is initialized when the document is loaded.

    Note that a document may be encrypted with an empty password, in which case HasUserPassword and HasOwnerPassword properties return false.

    Note also that, according to the PDF specification, if an owner password is not specified, then the user password should be used. GcPdf follows this rule, so if a PDF that was created using GcPdf with only a user password is loaded into GrapeCity.Documents.Pdf.GcPdfDocument, its AccessType will be AccessType.Owner, HasOwnerPassword will be true and HasUserPassword will also be true. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets the PDF object ID. (Inherited from GrapeCity.Documents.Pdf.Wrappers.PdfWrapperBase)
    Public PropertyGets or sets the password required to change permissions of a PDF document as a string.

    The two properties OwnerPassword and OwnerPasswordBytes allow to define the password as a string or as an array of bytes.

    According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets or sets the password required to change permissions of a PDF document as a byte array.

    The two properties OwnerPassword and OwnerPasswordBytes allow to define the password as a string or as an array of bytes.

    According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets a combination of flags that indicate how the password specified when loading the PDF matches the document's User and Owner passwords. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets the underlying GrapeCity.Documents.Pdf.Spec.IPdfDict. (Inherited from GrapeCity.Documents.Pdf.Wrappers.PdfDictWrapper)
    Public PropertyGets the underlying GrapeCity.Documents.Pdf.Spec.IPdfObject. (Inherited from GrapeCity.Documents.Pdf.Wrappers.PdfWrapper<IPdfDict>)
    Public PropertyGets or sets a value controlling how a document can be printed.  
    Public PropertyGets the revision of this StandardSecurityHandler. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets or sets the password required to open a PDF document as a string.

    The two properties UserPassword and UserPasswordBytes allow to define the password as a string or as an array of bytes.

    According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using UserPasswordBytes. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public PropertyGets or sets the password required to open a PDF document as a byte array.

    The two properties UserPassword and UserPasswordBytes allow to define the password as a string or as an array of bytes.

    According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Top
    Public Methods
     NameDescription
    Public MethodCopies all property values from another object. (Inherited from GrapeCity.Documents.Pdf.Security.StandardSecurityHandler)
    Public MethodCreate copy of this SecurityHandlerBase. (Inherited from GrapeCity.Documents.Pdf.Security.SecurityHandlerBase)
    Public MethodReleases the unmanaged resources used by the SecurityHandlerBase and optionally releases the managed resources. (Inherited from GrapeCity.Documents.Pdf.Security.SecurityHandlerBase)
    Public MethodGets the System.IO.Stream object containing the data of GrapeCity.Documents.Pdf.Spec.PdfStreamObjectBase owned by this wrapper. Note! The stream should be disposed after usage. (Inherited from GrapeCity.Documents.Pdf.Wrappers.PdfWrapperBase)
    Public MethodGets the data of GrapeCity.Documents.Pdf.Spec.PdfStreamObjectBase owned by this wrapper. (Inherited from GrapeCity.Documents.Pdf.Wrappers.PdfWrapperBase)
    Public MethodGets the GrapeCity.Documents.Pdf.Spec.PdfStreamInfo object containing the data of GrapeCity.Documents.Pdf.Spec.PdfStreamObjectBase owned by this wrapper. Note! The stream should be disposed after usage. (Inherited from GrapeCity.Documents.Pdf.Wrappers.PdfWrapperBase)
    Top
    See Also