Class Security

Class Security

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

Stellt das Aspose.Pdf.Plugins.Security-Plugin dar.

public sealed class Security : IPlugin

Vererbung

objectSecurity

Implementiert

IPlugin

Vererbte Mitglieder

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

Beispiele

Das Beispiel zeigt, wie man ein PDF-Dokument verschlüsselt.

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

Das Beispiel zeigt, wie man ein PDF-Dokument entschlüsselt.

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

Konstruktoren

Security()

public Security()

Methoden

Process(IPluginOptions)

Startet die Verarbeitung von Aspose.Pdf.Plugins.Security mit den angegebenen Parametern.

public ResultContainer Process(IPluginOptions options)

Parameter

options IPluginOptions

Ein Optionsobjekt, das Anweisungen für die Aspose.Pdf.Plugins.Security enthält.

Rückgabewert

ResultContainer

Ein ResultContainer-Objekt, das das Ergebnis der Operation enthält.

Ausnahmen

InvalidOperationException

 Deutsch