PdfViewer for WPF and Silverlight Overview > PdfViewer Features > Loading Documents > Loading Encrypted Files |
You can open encrypted files using the C1PdfViewer so long as you have the password that the file was encrypted with. To load password protected PDF documents use the LoadDocument method with the password as a parameter.
Visual Basic |
Copy Code
|
---|---|
Dim password As String = "password" Await pdfViewer.LoadDocument(stream, password) |
C# |
Copy Code
|
---|---|
string password = "password"; await pdfViewer.LoadDocument(stream, password); |
For a complete example that shows how to open encrypted and non-encrypted files together, see the topic Opening Potentially Protected Files.