Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfDocumentSecurity

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
ac7e6e1bad8a with working tree changes
Modifiers
sealed

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

Methods

public PdfDocument CompleteExternalSignature(byte[] signatureContents) #

Completes the most recently prepared external signature with encoded CMS bytes.

Parameters

signatureContents byte[] required
public 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 optional
Decrypt 2 overloads
public PdfSecurityMutationResult Decrypt(string ownerPassword) #

Removes Standard password security using the current owner password.

Parameters

ownerPassword string required
public PdfSecurityMutationResult Decrypt(string ownerPassword, CancellationToken cancellationToken) #

Removes Standard password security with cancellation through rewriting and preservation readback.

Parameters

ownerPassword string required
cancellationToken System.Threading.CancellationToken required
Encrypt 2 overloads
public PdfSecurityMutationResult Encrypt(PdfStandardEncryptionOptions encryption) #

Encrypts an unencrypted PDF and returns the rewritten document with preservation proof.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions required
public PdfSecurityMutationResult Encrypt(PdfStandardEncryptionOptions encryption, CancellationToken cancellationToken) #

Encrypts this PDF with cancellation through planning, serialization and preservation readback.

Parameters

encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions required
cancellationToken System.Threading.CancellationToken required
public 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 optional
cancellationToken System.Threading.CancellationToken = default optional
Reencrypt 2 overloads
public PdfSecurityMutationResult Reencrypt(string currentOwnerPassword, PdfStandardEncryptionOptions newEncryption) #

Replaces Standard password security using the current owner password.

Parameters

currentOwnerPassword string required
newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions required
public PdfSecurityMutationResult Reencrypt(string currentOwnerPassword, PdfStandardEncryptionOptions newEncryption, CancellationToken cancellationToken) #

Replaces Standard password security with cancellation through rewriting and preservation readback.

Parameters

currentOwnerPassword string required
newEncryption OfficeIMO.Pdf.PdfStandardEncryptionOptions required
cancellationToken System.Threading.CancellationToken required
public 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 required
options OfficeIMO.Pdf.PdfExternalSignatureOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
ValidateSignatures 2 overloads
public PdfSignatureValidationReport ValidateSignatures(PdfLoadOptions? options = null) #

Validates signature structure, byte ranges, and preservation markers.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfSignatureValidationReport ValidateSignatures(IPdfSignatureCryptographyProvider cryptographyProvider, PdfLoadOptions? options = null) #

Validates signatures with caller-provided CMS, trust, timestamp, and revocation policy.

Parameters

cryptographyProvider OfficeIMO.Pdf.IPdfSignatureCryptographyProvider required
options OfficeIMO.Pdf.PdfLoadOptions? = null optional