Skip to main content

Open Encrypted PDF

Version: 3.0

Opening an Encrypted PDF

Opening an encrypted PDF file using DynamicPDF Viewer is simple and easy. Providing the password while opening the PDF document is all that is needed to open the PDF. The following example illustrates.

How to Open an Encrypted PDF File​

Below are the steps and C# sample code to open an encrypted PDF file using the DynamicPDF Viewer for .NET.

Steps for opening encrypted PDF​

  1. Create a PdfDocument with the PDF file and the password.
  2. Open the file.

Sample Code - C#​

PdfDocument pdfDocument = new PdfDocument(@"MyDocument.pdf", "password");
pdfViewer.Open(pdfDocument);

GitHub Project​

Examples are provided in C# and VB.NET. Clone or view the example project at GitHub.

View source on GitHub: DynamicPDF Viewer for .NET

Getting Started​

Get started easily by installing DynamicPDF Viewer for .NET through NuGet or manually. Then, refer to the documentation for more information on using and purchasing.

NuGet Package​

DynamicPDF Viewer available on NuGet and is part of the ceTe.DynamicPDF.Viewer.NET package. The easiest way to install the package is through the Visual Studio Package Manager, but you can also download the package from NuGet.

Get ceTe.DynamicPDF.Viewer.NET from NuGet

DynamicPDF Viewer Information​

Use our customizable .NET control, DynamicPDF Viewer for .NET, to fully embed it into any .NET WinForm application. This control eliminates the need for an external viewer to display or interact with your PDF documents. DynamicPDF Viewer for .NET is efficient, reliable, and compatible with all our DynamicPDF products. With a free evaluation edition available for you to try, why not start using DynamicPDF Viewer today?

Documentation version