Class Security

Class Security

名称: Aspose.Pdf.Plugins 集合: Aspose.PDF.dll (25.4.0)

代表 Aspose.Pdf.Plugins.Security 插件。

public sealed class Security : IPlugin

Inheritance

object Security

Implements

IPlugin

继承人

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

示例表明如何加密PDF文档。

// 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);

例子表明如何解密PDF文档。

// 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(IPlugin 选项)

以指定的参数启动 Aspose.Pdf.Plugins.Security 处理。

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

包含 Aspose.Pdf.Plugins.Security 的指示的选项对象。

Returns

ResultContainer

一个 ResultContainer 对象,包含操作结果。

Exceptions

InvalidOperationException

 中文