API Reference
PdfDocumentSecurity
Password encryption and digital-signature operations for one PDF document.
Inheritance
- Object
- PdfDocumentSecurity
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property PdfDocument.Security
Methods
public PdfDocument CompleteExternalSignature(Byte[] signatureContents) #PdfDocumentCompletes the most recently prepared external signature with encoded CMS bytes.
Parameters
- signatureContents System.Byte[]
public PdfUnsignedDerivativeResult CreateUnsignedDerivative(CancellationToken cancellationToken = null) #PdfUnsignedDerivativeResultCreates an explicit full-rewrite derivative with invalidated PDF signature fields and revisions removed. Encrypted sources require owner authorization and the returned derivative is unencrypted.
Parameters
- cancellationToken System.Threading.CancellationToken = null
public PdfSecurityMutationResult Decrypt(String ownerPassword) #PdfSecurityMutationResultRemoves Standard password security using the current owner password.
Parameters
- ownerPassword System.String
public PdfOperationResult<PdfSecurityMutationResult> DecryptResult(String ownerPassword) #PdfOperationResult<PdfSecurityMutationResult>Attempts to remove Standard password security using the current owner password.
Parameters
- ownerPassword System.String
public PdfSecurityMutationResult Encrypt(PdfStandardEncryptionOptions encryption) #PdfSecurityMutationResultEncrypts an unencrypted PDF and returns the rewritten document with preservation proof.
Parameters
- encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
public PdfOperationResult<PdfSecurityMutationResult> EncryptResult(PdfStandardEncryptionOptions encryption) #PdfOperationResult<PdfSecurityMutationResult>Attempts to encrypt an unencrypted PDF through the shared mutation planner.
Parameters
- encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
public PdfExternalSignaturePreparation PrepareExternalSignature(PdfExternalSignatureOptions options = null) #PdfExternalSignaturePreparationPrepares a placeholder and byte ranges for an externally produced signature.
Parameters
- options OfficeIMO.Pdf.PdfExternalSignatureOptions = null
public PdfOperationResult<PdfExternalSignaturePreparation> PrepareExternalSignatureResult(PdfExternalSignatureOptions signatureOptions = null, PdfLoadOptions options = null) #PdfOperationResult<PdfExternalSignaturePreparation>Attempts to prepare an external signature through document preflight.
Parameters
- signatureOptions OfficeIMO.Pdf.PdfExternalSignatureOptions = null
- options OfficeIMO.Pdf.PdfLoadOptions = null
public PdfSecurityMutationResult Reencrypt(String currentOwnerPassword, PdfStandardEncryptionOptions newEncryption) #PdfSecurityMutationResultReplaces Standard password security using the current owner password.
Parameters
- currentOwnerPassword System.String
- newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
public PdfOperationResult<PdfSecurityMutationResult> ReencryptResult(String currentOwnerPassword, PdfStandardEncryptionOptions newEncryption) #PdfOperationResult<PdfSecurityMutationResult>Attempts to replace Standard password security using the current owner password.
Parameters
- currentOwnerPassword System.String
- newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
public PdfExternalSignatureCompletion SignExternal(IPdfExternalSigner signer, PdfExternalSignatureOptions options = null) #PdfExternalSignatureCompletionPrepares, delegates signing, and completes an external signature in one operation.
Parameters
- signer OfficeIMO.Pdf.IPdfExternalSigner
- options OfficeIMO.Pdf.PdfExternalSignatureOptions = null
public PdfSignatureValidationReport ValidateSignatures(PdfLoadOptions options = null) #PdfSignatureValidationReportValidates signature structure, byte ranges, and preservation markers.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions = null
public PdfSignatureValidationReport ValidateSignatures(IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions options = null) #PdfSignatureValidationReportValidates signatures with caller-provided CMS, trust, timestamp, and revocation policy.
Parameters
- cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider
- options OfficeIMO.Pdf.PdfLoadOptions = null