Class Security

Class Security

Navne til: Aspose.Pdf.Plugins Sammensætning: Aspose.PDF.dll (25.4.0)

Det repræsenterer Aspose.Pdf.Plugins.Security plugin.

public sealed class Security : IPlugin

Inheritance

object Security

Implements

IPlugin

De arvede medlemmer

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

Examples

Eksemplet viser, hvordan man krypterer PDF-dokumentet.

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

Eksemplet viser, hvordan man dekrypterer PDF-dokumentet.

// 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(IPluginoptioner)

Start Aspose.Pdf.Plugins.Security behandlingen med de angivne parametre.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Et alternativ objekt, der indeholder instruktioner for Aspose.Pdf.Plugins.Security.

Returns

ResultContainer

En ResultContainer-objekt, der indeholder resultatet af operationen.

Exceptions

InvalidOperationException

 Dansk