# Test-OfficePdfRewrite

Creates a proof report for user-visible signals preserved by a PDF rewrite.

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 **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Pdf.PdfRewritePreservationReport`

**Source**

[TestOfficePdfRewriteCommand.cs:10](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/TestOfficePdfRewriteCommand.cs#L10) 

Creates a proof report for user-visible signals preserved by a PDF rewrite.

## Syntax

```
Test-OfficePdfRewrite
[-DifferencePassword <String>]
[-DifferencePath] <String>
[-FailOnLoss]
[-IgnoreDifferencePermissionRestrictions]
[-IgnoreReferencePermissionRestrictions]
[-Options <PdfRewritePreservationOptions>]
[-ReferencePassword <String>]
[-ReferencePath] <String>
[<CommonParameters>]
```

[#](#method-test-officepdfrewrite-string-string-switchparameter-switchparameter-switchparameter-pdfrewritepreservationoptions-string-string)

Parameter set: `All Parameter Sets`

## Examples

### Example 1

```powershell
Test-OfficePdfRewrite -ReferencePath 'C:\Path' -DifferencePath 'C:\Path'
```

## Parameters

**-DifferencePassword String optional**

Password used to authenticate the rewritten PDF.

**-DifferencePath String requiredposition: 1**

Rewritten PDF path.

**-FailOnLoss SwitchParameter optional**

Throw when preservation checks find a mismatch.

**-IgnoreDifferencePermissionRestrictions SwitchParameter optional**

After authentication, explicitly ignore restrictions on the rewritten PDF.

**-IgnoreReferencePermissionRestrictions SwitchParameter optional**

After authentication, explicitly ignore restrictions on the original PDF.

**-Options PdfRewritePreservationOptions optional**

Optional required preservation signals and limits.

**-ReferencePassword String optional**

Password used to authenticate the original PDF.

**-ReferencePath String requiredposition: 0**

Original PDF path.

## 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:548222B5BBA13633057B99EDF3B2594B391A3B787FD556153E726B2B2E4E628B -->
