Class Security
Class Security
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
Reprezentuje wtyczkę Aspose.Pdf.Plugins.Security.
public sealed class Security : IPlugin
Dziedziczenie
Implementuje
Członkowie dziedziczeni
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Przykłady
Przykład demonstruje, jak zaszyfrować dokument PDF.
// utwórz Security
var plugin = new Security();
// utwórz obiekt EncryptionOptions, aby ustawić instrukcje
var opt = new EncryptionOptions("123456", "qwerty", DocumentPrivilege.ForbidAll));
// dodaj ścieżkę do pliku wejściowego
opt.AddInput(new FileDataSource(inputPath));
// ustaw ścieżkę do pliku wyjściowego
opt.AddOutput(new FileDataSource(outputPath));
// wykonaj proces
plugin.Process(opt);
Przykład demonstruje, jak odszyfrować dokument PDF.
// utwórz Security
var plugin = new Security();
// utwórz obiekt DecryptionOptions, aby ustawić instrukcje
var opt = new DecryptionOptions("123456"));
// dodaj ścieżkę do pliku wejściowego
opt.AddInput(new FileDataSource(inputPath));
// ustaw ścieżkę do pliku wyjściowego
opt.AddOutput(new FileDataSource(outputPath));
// wykonaj proces
plugin.Process(opt);
Konstruktory
Security()
public Security()
Metody
Process(IPluginOptions)
Rozpoczyna przetwarzanie Aspose.Pdf.Plugins.Security z określonymi parametrami.
public ResultContainer Process(IPluginOptions options)
Parametry
options
IPluginOptions
Obiekt opcji zawierający instrukcje dla Aspose.Pdf.Plugins.Security.
Zwraca
Obiekt ResultContainer zawierający wynik operacji.