Cmdlet
Compare-OfficePdfVisual
Compares rendered PDF pages and returns pixel-level review artifacts.
Syntax
Compare-OfficePdfVisual [-DifferencePassword <String>] [-DifferencePath] <String> [-DifferenceReadOptions <PdfLoadOptions>] [-IgnoreDifferencePermissionRestrictions] [-IgnoreReferencePermissionRestrictions] [-Options <PdfVisualComparisonOptions>] [-PageRange <String>] [-ReferencePassword <String>] [-ReferencePath] <String> [-ReferenceReadOptions <PdfLoadOptions>] [<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Compare selected pages with a small pixel tolerance.
$options = New-OfficePdfVisualComparisonOptions -AllowedDifferenceRatio 0.001 -ChannelTolerance 2
Compare-OfficePdfVisual -ReferencePath .\Expected.pdf -DifferencePath .\Actual.pdf -PageRange '1-3' -Options $optionsReturns per-page difference ratios, images, and diagnostics.
Parameters
- -DifferencePassword String
- Password used to authenticate the actual PDF.
- -DifferencePath String
- Actual PDF path.
- -DifferenceReadOptions PdfLoadOptions
- Optional bounded read settings for the actual document.
- -IgnoreDifferencePermissionRestrictions SwitchParameter
- After authentication, explicitly ignore restrictions on the actual PDF.
- -IgnoreReferencePermissionRestrictions SwitchParameter
- After authentication, explicitly ignore restrictions on the expected PDF.
- -Options PdfVisualComparisonOptions
- Optional render, tolerance, alignment, background, and ignored regions.
- -PageRange String
- Optional one-based ranges such as 1-3,5.
- -ReferencePassword String
- Password used to authenticate the expected PDF.
- -ReferencePath String
- Expected PDF path.
- -ReferenceReadOptions PdfLoadOptions
- Optional bounded read settings for the expected document.
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.