Examples

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 an 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

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

Sample Code - C#

PdfDocument pdfDocument = new PdfDocument(@"C:\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.

NuGet Package ID: ceTe.DynamicPDF.Viewer.NET

Example Project

An example project showing this functionality can be cloned or viewed from GitHub:

Clone or View Example Project on GitHub

DynamicPDF Viewer Information

More information can be found here:

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 18 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!