Class Security
Innehåll
[
Dölj
]Säkerhet klass
Representerar Security plugin.
public sealed class Security : IPlugin
Konstruktörer
| Namn | Beskrivning |
|---|---|
| Security() | Standardkonstruktören. |
Metoder
| Namn | Beskrivning |
|---|---|
| Process(IPluginOptions) | Startar Security bearbetning med angivna parametrar. |
Exempel
Exemplet visar hur man krypterar en PDF-dokument.
// 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);
Exemplet visar hur man dekrypterar en PDF-dokument.
// 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);
Se Även
- interface IPlugin
- namespace Aspose.Pdf.Plugins
- assembly Aspose.PDF