Protect PDF using Python
Set document privileges for PDF with AES-128 encryption. Use Aspose.PDF for Python for .NET to modify PDF documents programmatically
How to Protect PDF File Using Using Python for .NET Tool
In order to protect PDF file, use Aspose.PDF for Python via .NET, a powerful and easy-to-use API. Open PyPI, search for aspose-pdf
, and install it. Alternatively, run the command:
Protect PDF using Python
You need Aspose.PDF for Python via .NET to try the code in your environment.
- Load the PDF with an instance of Document.
- Create an object of DocumentPrivilege & set options.
- Call Document.Encrypt method to protect PDF with AES-128.
- Save result in PDF format