PdfDocumentSecurity
OfficeIMO.Pdf
Password encryption and digital-signature operations for one PDF document.
Inheritance
- object
- PdfDocumentSecurity
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Property PdfDocument.Security
Methods
public PdfDocument CompleteExternalSignature(byte[] signatureContents) #Completes the most recently prepared external signature with encoded CMS bytes.
Parameters
- signatureContents byte[]
Returns
PdfDocumentpublic PdfUnsignedDerivativeResult CreateUnsignedDerivative(CancellationToken cancellationToken = default) #Creates 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 = default
Returns
PdfUnsignedDerivativeResultpublic PdfSecurityMutationResult Decrypt(string ownerPassword) #Removes Standard password security using the current owner password.
Parameters
- ownerPassword string
Returns
PdfSecurityMutationResultpublic PdfSecurityMutationResult Decrypt(string ownerPassword, CancellationToken cancellationToken) #Removes Standard password security with cancellation through rewriting and preservation readback.
Parameters
- ownerPassword string
- cancellationToken System.Threading.CancellationToken
Returns
PdfSecurityMutationResultpublic PdfSecurityMutationResult Encrypt(PdfStandardEncryptionOptions encryption) #Encrypts an unencrypted PDF and returns the rewritten document with preservation proof.
Parameters
- encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
Returns
PdfSecurityMutationResultpublic PdfSecurityMutationResult Encrypt(PdfStandardEncryptionOptions encryption, CancellationToken cancellationToken) #Encrypts this PDF with cancellation through planning, serialization and preservation readback.
Parameters
- encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
- cancellationToken System.Threading.CancellationToken
Returns
PdfSecurityMutationResultpublic PdfExternalSignaturePreparation PrepareExternalSignature(PdfExternalSignatureOptions? options = null, CancellationToken cancellationToken = default) #Prepares a placeholder and byte ranges for an externally produced signature.
Parameters
- options OfficeIMO.Pdf.PdfExternalSignatureOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public PdfSecurityMutationResult Reencrypt(string currentOwnerPassword, PdfStandardEncryptionOptions newEncryption) #Replaces Standard password security using the current owner password.
Parameters
- currentOwnerPassword string
- newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
Returns
PdfSecurityMutationResultpublic PdfSecurityMutationResult Reencrypt(string currentOwnerPassword, PdfStandardEncryptionOptions newEncryption, CancellationToken cancellationToken) #Replaces Standard password security with cancellation through rewriting and preservation readback.
Parameters
- currentOwnerPassword string
- newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions
- cancellationToken System.Threading.CancellationToken
Returns
PdfSecurityMutationResultpublic PdfExternalSignatureCompletion SignExternal(IPdfExternalSigner signer, PdfExternalSignatureOptions? options = null, CancellationToken cancellationToken = default) #Prepares, delegates signing, and completes an external signature in one operation.
Parameters
- signer OfficeIMO.Pdf.IPdfExternalSigner
- options OfficeIMO.Pdf.PdfExternalSignatureOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public PdfSignatureValidationReport ValidateSignatures(PdfLoadOptions? options = null) #Validates signature structure, byte ranges, and preservation markers.
Parameters
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfSignatureValidationReportpublic PdfSignatureValidationReport ValidateSignatures(IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions? options = null) #Validates signatures with caller-provided CMS, trust, timestamp, and revocation policy.
Parameters
- cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider
- options OfficeIMO.Pdf.PdfLoadOptions? = null
Returns
PdfSignatureValidationReport