# Test-OfficePdfRewrite

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Pdf.PdfRewritePreservationReport`

**Source**

[TestOfficePdfRewriteCommand.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/TestOfficePdfRewriteCommand.cs#L13) 

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

## Syntax

```
Test-OfficePdfRewrite
[-DifferencePassword <SecureString>]
[-DifferencePath] <String>
[-FailOnLoss]
[-IgnoreDifferencePermissionRestrictions]
[-IgnorePermissionRestrictions]
[-Options <Object[]>]
[-Password <SecureString>]
[-ReferencePath] <String>
[<CommonParameters>]
```

[#](#method-test-officepdfrewrite-securestring-string-switchparameter-switchparameter-switchparameter-object-securestring-string)

Parameter set: `Path`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Migrate from PSWritePDF to PSWriteOffice](/docs/pswriteoffice/migrate-from-pswritepdf/) Guide
  
  Replace legacy PSWritePDF and iText-based scripts with maintained OfficeIMO PDF commands for authoring, extraction, forms, and merge.
- [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.
- [Automate PDF Workflows](/docs/pswriteoffice/pdf/) Guide
  
  Author, inspect, combine, annotate, sign, preflight, optimize, redact, and extract PDF files. Includes examples and cmdlet links.

## Examples

### Example 1

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

## Parameters

**-DifferencePassword SecureString 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.

**-IgnorePermissionRestrictions SwitchParameter optional**

After authentication, explicitly ignore restrictions on the original PDF.

**-Options Object[] optional**

Optional required preservation signals and limits.

**-Password SecureString 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).

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