Project

PSWriteOffice

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

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Test-OfficePdfRewrite

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Pdf.PdfRewritePreservationReport

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>]
#
Parameter set: All Parameter Sets

Examples

Example 1

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.