Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Security Namespace / StandardSecurityHandler Class / HasUserPassword Property

In This Topic
    HasUserPassword Property
    In This Topic
    Gets 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.
    Syntax
    'Declaration
     
    Public ReadOnly Property HasUserPassword As System.Nullable(Of Boolean)
    public System.Nullable<bool> HasUserPassword {get;}
    See Also