Class Security
Information
Représente le plugin Documentize.Security. Utilisé pour crypter et décrypter les documents PDF.
public static class Security
Héritage
Membres hérités
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Exemples
L’exemple démontre comment crypter un document PDF.
// Créer un objet EncryptionOptions pour définir les instructions
var options = new EncryptionOptions("123456", "qwerty");
// Ajouter le chemin du fichier d'entrée
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Définir le chemin du fichier de sortie
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Effectuer le processus
Security.Process(options);
L’exemple démontre comment décrypter un document PDF.
// Créer un objet DecryptionOptions pour définir les instructions
var options = new DecryptionOptions("123456");
// Ajouter le chemin du fichier d'entrée
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Définir le chemin du fichier de sortie
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Effectuer le processus
Security.Process(options);
Méthodes
Process(EncryptionOptions)
Crypter le document PDF.
public static ResultContainer Process(EncryptionOptions options)
Paramètres
options
EncryptionOptions : Un objet d’options contenant des instructions pour l’opération.
Renvoie
ResultContainer : Un objet contenant le résultat de l’opération.
Exceptions
Si les options ne sont pas définies.
Process(DecryptionOptions)
Décrypter le document PDF.
public static ResultContainer Process(DecryptionOptions options)
Paramètres
options
DecryptionOptions : Un objet d’options contenant des instructions pour l’opération.
Renvoie
ResultContainer : Un objet contenant le résultat de l’opération.
Exceptions
Si les options ne sont pas définies.
Namespace: Documentize Assembly: Documentize.dll