Class Security
Class Security
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
Represents Aspose.Pdf.Plugins.Security plugin.
public sealed class Security : IPlugin
Inheritance
Implements
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
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);
Constructors
Security()
public Security()
Methods
Process(IPluginOptions)
Starts the Aspose.Pdf.Plugins.Security processing with the specified parameters.
public ResultContainer Process(IPluginOptions options)
Parameters
options
IPluginOptions
An options object containg instructions for the Aspose.Pdf.Plugins.Security.
Returns
A ResultContainer object containg the result of the operation.