PDF Document Protect Solution
Protect PDF documents with free cross-platform Apps and APIs
How to Protect PDF File Using Aspose.PDF Library
In order to protect PDF file, we’ll use Aspose.PDF API which is a feature-rich, powerful and easy to use document manipulation API for {{product}} platform. Open NuGet package manager, search for Aspose.PDF and install. You may also use the following command from the Package Manager Console. You can use the Encrypt method of the Document object to encrypt a PDF file. You can pass the user password, owner password, and permissions to the Encrypt method. In addition to that, you can pass any value of the CryptoAlgorithm enum. This enum provides different combinations of encryption algorithms and key sizes. You can pass the value of your choice. Finally, save the encrypted PDF file using Save method of the Document object.
High Code APIs to Add or Remove Electronic Signatures from Document
Native APIs to e-sign PDF files using .NET, .NET Core, Xamarin, Java, C++ & Android.
Encrypt PDF File
// Open document
Document document = new Document(dataDir+ "Encrypt.pdf");
// Encrypt PDF
document.Encrypt("user", "owner", 0, CryptoAlgorithm.RC4x128);
dataDir = dataDir + "Encrypt_out.pdf";
// Save updated PDF
document.Save(dataDir);
About Aspose.PDF API
Aspose.PDF API can be used for PDF document manipulation and parsing within applications. One can create, modify, compress, secure, print or save PDF to TXT, HTML, PCL, XFA, XML, XPS, EPUB, TEX, Images and more formats. Aspose.PDF is a standalone API and it does not depend on any software including Adobe Acrobat.Free App to Protect PDF
Check our live demos to encrypt PDF files with following benefits.