Back to Devexpress

PdfPasswordRequestedEventArgs.PasswordString Property

officefileapi-devexpress-dot-pdf-dot-pdfpasswordrequestedeventargs.md

latest1.9 KB
Original Source

PdfPasswordRequestedEventArgs.PasswordString Property

Specifies the security password to open a PDF file.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public string PasswordString { get; set; }
vb
Public Property PasswordString As String

Property Value

TypeDescription
String

The security password.

|

Remarks

To interrupt the password request process, set the PasswordString property to null ( Nothing in Visual Basic).

Example

The following code illustrates the use of the PdfViewer.PasswordRequested event.

csharp
using System.Windows.Forms;
using DevExpress.Pdf;
// ...

private void pdfViewer1_PasswordRequested(object sender,
    PdfPasswordRequestedEventArgs e) {
    e.PasswordString = "password";    
}
vb
Imports System.Windows.Forms
Imports DevExpress.Pdf
' ...

Private Sub pdfViewer1_PasswordRequested(ByVal sender As Object, _
ByVal e As PdfPasswordRequestedEventArgs) Handles pdfViewer1.PasswordRequested
    e.PasswordString = "password"   
End Sub

See Also

PdfPasswordRequestedEventArgs Class

PdfPasswordRequestedEventArgs Members

DevExpress.Pdf Namespace