Open Encrypted PDF using .NET
Opening an encrypted PDF file using DynamicPDF Viewer is simple and easy. Providing the password while opening the PDF document will suffice to open the PDF.
How to open encrypted PDF file in C#
Below are the steps and sample code to open an encrypted PDF file using the Rasterizer product.
Steps for opening encrypted PDF
- Create a
PdfDocument
with the PDF file and the password. - Open the file.
Sample Code - C#
PdfDocument pdfDocument = new PdfDocument(@"MyDocument.pdf", "password");
pdfViewer.Open(pdfDocument);
Getting Started
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.
Example Project
An example project showing this functionality can be cloned or viewed from GitHub:
DynamicPDF Viewer Information
More information can be found here: