
Modify Content - Allows modifying the contents of the document. Print Document - Allows printing the document. The following is the list of the permissions that you can set to allow for a user. In such a case, you can specify the operations which are allowed for the users. You can enhance the security of a PDF document by limiting the user’s permission. Change Security Permissions of a PDF File in C#
The following code sample shows how to decrypt a PDF document using C#.
Load PDF document using Document class by specifying the user’s or owner’s password. The following are the simple steps to decrypt a PDF document: In order to decrypt a PDF document, you must have the user or owner password of the document. When you will open this encrypted PDF document in Adobe Reader, it will popup the following dialogue. The following code sample shows how to encrypt a PDF document using C#. Save the encrypted PDF document using Document.Save method.
Encrypt the PDF document with a password and cryptographic algorithm using Document.Encrypt method. Load the PDF document using Document class. The following are the simple steps to encrypt a PDF document using C#.
NET supports the following encryption methods: In addition, you have to specify the desired cryptographic algorithm as the encryption method. In order to encrypt a PDF file, you need to set a password that will be required to open and view the document. Alternatively, you can download the API’s DLL from the Downloads section. NET is hosted on NuGet and can easily be installed using the NuGet Package Manager.
Change security permissions in a PDF fileĬ# PDF Encryption and Decryption API - Installation #Īspose.PDF for. In this article, I’ll show you how to perform PDF encryption and decryption operations using C#. NET, provides some simple ways to encrypt and decrypt PDF files using C# and VB.NET. On the other hand, you can also limit the access permissions to various operations such as printing, editing, copying, etc.
Most often, the PDF documents are encrypted with a password that is required to open the document. If a PDF document is encrypted, you have to decrypt it to access its content, otherwise, it will remain unreadable. PDF encryption is used to secure the PDF document from unauthorized access.