Class Security
Contents
[
Hide
]Security class
Represents Security plugin.
public sealed class Security : IPlugin
Constructors
| Name | Description |
|---|---|
| Security() | The default constructor. |
Methods
| Name | Description |
|---|---|
| Process(IPluginOptions) | Starts the Security processing with the specified parameters. |
Examples
The example demonstrates how to encrypt PDF document.
// create Security
var plugin = new Security();
// create EncryptionOptions object to set instructions
var opt = new EncryptionOptions("123456", "qwerty", DocumentPrivilege.ForbidAll));
// add input file path
opt.AddInput(new FileDataSource(inputPath));
// set output file path
opt.AddOutput(new FileDataSource(outputPath));
// perform the process
plugin.Process(opt);
The example demonstrates how to decrypt PDF document.
// create Security
var plugin = new Security();
// create DecryptionOptions object to set instructions
var opt = new DecryptionOptions("123456"));
// add input file path
opt.AddInput(new FileDataSource(inputPath));
// set output file path
opt.AddOutput(new FileDataSource(outputPath));
// perform the process
plugin.Process(opt);
See Also
- interface IPlugin
- namespace Aspose.Pdf.Plugins
- assembly Aspose.PDF