# Set-OfficePdfSignature

Injects externally produced CMS, CAdES, or timestamp signature bytes into a prepared PDF signature placeholder.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.String`

**Outputs**

`System.IO.FileInfo` `OfficeIMO.Pdf.PdfSignatureValidationReport`

**Source**

[SetOfficePdfSignatureCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/SetOfficePdfSignatureCommand.cs#L18) 

Injects externally produced CMS, CAdES, or timestamp signature bytes into a prepared PDF signature placeholder.

## Syntax

```
Set-OfficePdfSignature
[-IgnorePermissionRestrictions]
[-OutputPath] <String>
[-PassThru]
[-PassThruReport]
[-Password <String>]
[-Path] <String>
[-SignaturePath] <String>
[<CommonParameters>]
```

[#](#method-set-officepdfsignature-switchparameter-string-switchparameter-switchparameter-string-string-string)

Parameter set: `All Parameter Sets`

## Examples

### Inject a detached CMS signature into a prepared PDF.

```powershell
Set-OfficePdfSignature -Path .\Prepared.pdf -SignaturePath .\signature.der -OutputPath .\Signed.pdf
Get-OfficePdfSignature -Path .\Signed.pdf
```

Writes a PDF with the reserved /Contents hex slot patched in place.

## Parameters

**-IgnorePermissionRestrictions SwitchParameter optional**

After successful password authentication, explicitly ignore owner-imposed signature restrictions.

**-OutputPath String requiredposition: 2**

Output signed PDF path.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-PassThruReport SwitchParameter optional**

Return a signature validation report for the written PDF instead of only the output file.

**-Password String optional**

Password used to authenticate an encrypted prepared PDF.

**-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath**

Prepared PDF path.

**-SignaturePath String requiredposition: 1**

DER/CMS/CAdES/TSA response bytes to inject into the reserved /Contents slot.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:45F6FEACA9BB67ACD8A207CAF2522A407D502C79CD5F0C43453F3FAFF7BCB377 -->
