# New-OfficePdfSignature

Prepare external PDF signature using native byte-range and signature-placeholder operations.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.String[]`

**Outputs**

`System.IO.FileInfo` `OfficeIMO.Pdf.PdfExternalSignaturePreparation`

**Source**

[NewOfficePdfSignatureCommand.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/NewOfficePdfSignatureCommand.cs#L14) 

Prepare external PDF signature using native byte-range and signature-placeholder operations.

## Syntax

```
New-OfficePdfSignature
[-ContactInfo <String>]
[-FieldName <String>]
[-Filter <String>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Location <String>]
[-Name <String>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Reason <String>]
[-ReservedSize <Int32>]
[-SubFilter <DetachedCms|CadesDetached|DocumentTimestamp>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-c739c638b6fa8ff31252ac62)

Parameter set: `Path`

```
New-OfficePdfSignature
[-ContactInfo <String>]
[-FieldName <String>]
[-Filter <String>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Location <String>]
[-Name <String>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Reason <String>]
[-ReservedSize <Int32>]
[-SubFilter <DetachedCms|CadesDetached|DocumentTimestamp>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-539d874a12edf9f2dcbca0e0)

Parameter set: `PathDirectory`

```
New-OfficePdfSignature
[-ContactInfo <String>]
[-FieldName <String>]
[-Filter <String>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Location <String>]
[-Name <String>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Reason <String>]
[-ReservedSize <Int32>]
[-SubFilter <DetachedCms|CadesDetached|DocumentTimestamp>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-6ae7db15300e8875d9db69e3)

Parameter set: `LiteralPath`

```
New-OfficePdfSignature
[-ContactInfo <String>]
[-FieldName <String>]
[-Filter <String>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Location <String>]
[-Name <String>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Reason <String>]
[-ReservedSize <Int32>]
[-SubFilter <DetachedCms|CadesDetached|DocumentTimestamp>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-08ecea2c59684cb286759fc1)

Parameter set: `LiteralPathDirectory`

## Description

Confirmation precedes loading, native mutation and output creation. This command does not obtain certificates or private keys.

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Inspect PDF Signatures and Compliance](/docs/pswriteoffice/pdf-signatures-compliance/) Guide
  
  Collect signature structure, compliance, diagnostics, and rewrite-preservation evidence before accepting or transforming a PDF.

## Examples

### Example 1

```powershell
New-OfficePdfSignature -Path @('C:\Path') -OutputPath 'C:\Path'
```

### Example 2

```powershell
New-OfficePdfSignature -OutputPath 'C:\Path' -LiteralPath @('C:\Path')
```

### Example 3

```powershell
New-OfficePdfSignature -OutputDirectory 'Value' -LiteralPath @('C:\Path')
```

## Parameters

**-ContactInfo String optional**

ContactInfo setting.

**-FieldName String optional**

FieldName setting.

**-Filter String optional**

Filter setting.

**-IgnorePermissionRestrictions SwitchParameter optional**

IgnorePermissionRestrictions setting.

**-LoadOptions PdfLoadOptions optional**

Native parsing, authentication and resource policy.

**-Location String optional**

Location setting.

**-Name String optional**

Name setting.

**-OutputPath String requiredsets: Path, LiteralPath**

Single-file destination.

**-PassThru SwitchParameter optional**

Return native annotation edit reports.

**-Password SecureString optional**

Password setting.

**-Path String[] requiredposition: 0sets: Path, PathDirectory**

Input PDF paths with wildcard expansion.

**-Reason String optional**

Reason setting.

**-ReservedSize Int32 optional**

ReservedSize setting.

**-SubFilter PdfExternalSignatureSubFilter optional**

SubFilter setting.

Possible values: `DetachedCms`, `CadesDetached`, `DocumentTimestamp`

**-WhatIf SwitchParameter optional**

Shows what would happen if the command runs.

**-Confirm SwitchParameter optional**

Prompts for confirmation before running the command.

**-OutputDirectory String requiredsets: PathDirectory, LiteralPathDirectory**

Batch destination retaining source names.

**-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath, LiteralPathDirectory**

Literal input PDF paths; accepts FileInfo.FullName.

## 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).

<!-- PowerForge markdown artifact sha256:F0FE2A995B58CDB11F8C3BA86C8DB5989138249B80F4777393B743738A50640A -->
