PDF for WPF and Silverlight Overview > Features: PDF for WPF and Silverlight > Loading Documents > Loading Encrypted Files |
You can open encrypted files using C1Pdf so long as you have the password that the file was encrypted with. To load password protected PDF documents use the LoadDocument or LoadDocumentAsync methods with the password as a parameter.
Visual Basic |
Copy Code
|
---|---|
Dim password As String = "password"
Await pdfViewer.LoadDocumentAsync(stream, password)
|
C# |
Copy Code
|
---|---|
string password = "password"; await pdfViewer.LoadDocumentAsync(stream, password); |