Class Security

Class Security

Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll

Đại diện cho plugin Aspose.Pdf.Plugins.Security.

public sealed class Security : IPlugin

Kế thừa

objectSecurity

Thực hiện

IPlugin

Thành viên kế thừa

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

Ví dụ

Ví dụ này minh họa cách mã hóa tài liệu PDF.

// tạo Security 
var plugin = new Security();
// tạo đối tượng EncryptionOptions để thiết lập hướng dẫn
var opt = new EncryptionOptions("123456", "qwerty", DocumentPrivilege.ForbidAll));
// thêm đường dẫn tệp đầu vào
opt.AddInput(new FileDataSource(inputPath));
// thiết lập đường dẫn tệp đầu ra
opt.AddOutput(new FileDataSource(outputPath));
// thực hiện quá trình
plugin.Process(opt);

Ví dụ này minh họa cách giải mã tài liệu PDF.

// tạo Security 
var plugin = new Security();
// tạo đối tượng DecryptionOptions để thiết lập hướng dẫn
var opt = new DecryptionOptions("123456"));
// thêm đường dẫn tệp đầu vào
opt.AddInput(new FileDataSource(inputPath));
// thiết lập đường dẫn tệp đầu ra
opt.AddOutput(new FileDataSource(outputPath));
// thực hiện quá trình
plugin.Process(opt);

Các hàm khởi tạo

Security()

public Security()

Phương thức

Process(IPluginOptions)

Bắt đầu quá trình Aspose.Pdf.Plugins.Security với các tham số được chỉ định.

public ResultContainer Process(IPluginOptions options)

Tham số

options IPluginOptions

Một đối tượng tùy chọn chứa hướng dẫn cho Aspose.Pdf.Plugins.Security.

Trả về

ResultContainer

Một đối tượng ResultContainer chứa kết quả của thao tác.

Ngoại lệ

InvalidOperationException

 Tiếng Việt