PDF Security
The Documentize PDF Security for .NET is a powerful tool designed to enhance the security of your PDF documents by providing encryption and decryption capabilities. It ensures that your sensitive information remains confidential and protected from unauthorized access.
How to Encrypt a PDF
To encrypt a PDF document, follow these steps:
- Create an instance of
EncryptionOptions
with the desired user and owner passwords. - Add the input PDF file using the
AddInput
method. - Add the output PDF file using
AddOutput
method. - Execute the encryption using the
Process
method ofSecurity
class.
1// Create EncryptionOptions object to set instructions
2var options = new EncryptionOptions("123456", "qwerty");
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
7// Perform the process
8Security.Process(options);
How to Decrypt a PDF
To decrypt a PDF document, follow these steps:
- Create an instance of
DecryptionOptions
with the necessary password. - Add the input PDF file using the
AddInput
method. - Add the output PDF file using
AddOutput
method. - Execute the encryption using the
Process
method ofSecurity
class.
1// Create DecryptionOptions object to set instructions
2var options = new DecryptionOptions("123456");
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
7// Perform the process
8Security.Process(options);
Key Features:
- Encrypt PDF Documents: Secure your PDF files by adding user and owner passwords.
- Decrypt PDF Documents: Remove encryption from PDFs when needed.
- Automation: Integrate encryption and decryption into your .NET applications for automated workflows.
- Compliance: Ensure your documents meet industry standards for document security.