Nutrient .NET SDK

Secure PDFs in your .NET application

  • Password-protect and encrypt PDFs with AES — user and owner passwords
  • Set granular permissions: printing, copying, editing, and more
  • Detect whether a PDF is password protected, then unlock it
  • Permanently redact sensitive content — available in C# and VB.NET

Need pricing or implementation help? Talk to Sales.

PDF SECURITY IN C#

using GdPicture14;
using GdPicturePDF pdf = new GdPicturePDF();
pdf.LoadFromFile(@"C:\temp\source.pdf", false);
// Check whether the PDF is password protected/encrypted.
if (pdf.IsEncrypted())
{
// Provide the user or owner password to unlock it.
GdPictureStatus status = pdf.SetPassword("user");
if (status == GdPictureStatus.OK)
{
bool stillEncrypted = pdf.IsEncrypted(); // false once unlocked
Console.WriteLine($"Still encrypted: {stillEncrypted}");
}
}

Used by Lufthansa, Disney, Autodesk, UBS, Dropbox, IBM
Lufthansa
Disney
Autodesk
UBS
Dropbox
IBM

Comprehensive PDF security for .NET

Encryption and passwords

Protect PDFs with AES encryption and user/owner passwords so only the right people can open or change them.

Permissions control

Allow or restrict printing, copying, editing, annotating, form filling, and assembly per document.

Detect and unlock

Check whether a PDF is encrypted. Then provide a user or owner password to unlock it for processing.

Redaction

Permanently remove sensitive text and content from a document — not just hide it.

PDF security capabilities for .NET

Encrypt and password-protect

Save a PDF with AES encryption and user and/or owner passwords to control who can open and edit it.


  • User (open) and owner (permissions) passwords
  • 128-bit AES via PdfEncryption
  • Save to file or stream

Set document permissions

Decide exactly what users can do — print, copy, modify, annotate, fill forms, or assemble pages.


  • Granular CanPrint, CanCopy, CanModify, and more
  • High-resolution print control
  • Enforced by the owner password

Detect and unlock protected PDFs

Check whether a document is password protected. Then supply the password to open it for processing.


  • IsEncrypted() check after loading
  • SetPassword() with user or owner password
  • Returns false once unlocked

Redact sensitive content

Search for and permanently remove confidential text and data before sharing a document.


  • Search and redact by text
  • Apply redaction to remove content irreversibly
  • Pairs with OCR for scanned documents

Two password types, granular control

A user (open) password controls who can view a document; an owner (permissions) password controls what they can do with it. Set either or both, and configure each permission independently. All security APIs are available in C# and VB.NET.

Encryption
128-bit AES User password Owner password

Permissions
Print Copy Modify Annotate Fill fields Assemble

C# API
IsEncrypted SetPassword SaveToStream PdfEncryption


HOW IT WORKS

Encrypt, restrict, and verify

Load a document, and save it with an encryption level, passwords, and a permission set — or check an incoming file with IsEncrypted and unlock it with SetPassword. Combine with redaction and digital signatures for end-to-end document security.

Document security access controls
Encrypt with passwords

Save with PdfEncryption and user/owner passwords so the document is protected at rest and in transit.


Restrict with permissions

Independently allow or deny printing, copying, editing, annotating, form filling, and assembly.


Detect and unlock

Use IsEncrypted to test an incoming PDF and SetPassword to open it before processing.


Note on PDF/A

Encryption isn’t available for PDF/A documents, since the standard prohibits it — plan archival flows accordingly.


Frequently asked questions

How do I check if a PDF is password protected in C#?

Load the PDF and call IsEncrypted() on the GdPicturePDF object — it returns true for an encrypted (password-protected) document. If it’s encrypted, call SetPassword() with the user or owner password to unlock it; IsEncrypted() then returns false. See the loading guide for more information.

How do I password-protect a PDF in C#?

Load the document and save it with an encryption overload — for example, SaveToStream (or SaveToFile) with PdfEncryption.PdfEncryption128BitAES, a user password, an owner password, and a set of permission flags. The result is an encrypted PDF that requires the password to open or edit.

What’s the difference between a user and owner password?

A user (open) password is required to open and view a document. An owner (permissions) password controls what a viewer can do — print, copy, edit, and so on. You can set either or both; with only an owner password, the PDF opens freely but actions stay restricted until the owner password is supplied.

Can I control printing, copying, and editing permissions?

Yes. When you encrypt, you set independent permission flags such as CanPrint, CanCopy, CanModify, CanAddNotes, CanFillFields, CanAssemble, and high-resolution printing. These are enforced for users who open the document with the user password.

How do I open or unlock an encrypted PDF?

Load the file, confirm it’s encrypted with IsEncrypted(), and call SetPassword() with the correct user or owner password. Once the password is accepted, you can read, modify, and resave the document like any other PDF.

What encryption does the SDK support?

The SDK encrypts PDFs using the PdfEncryption options, including 128-bit AES. Note that encryption isn’t available for PDF/A documents, because the PDF/A standard doesn’t permit encryption.

Can I redact or digitally sign PDFs for security?

Yes. Beyond encryption, the SDK can redact sensitive content (permanent removal) and add digital signatures for integrity and authenticity — covering the full document security workflow.

Is there a free trial?

Yes. Get started with a free trial of the .NET SDK. Then contact Sales for pricing or a production license.