API Reference

Cmdlet

Compare-OfficePdfVisual

Namespace PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Pdf.PdfVisualComparisonReport

Compares rendered PDF pages and returns pixel-level review artifacts.

Remarks

Compares rendered PDF pages and returns pixel-level review artifacts.

Examples

Authored help example

Compare selected pages with a small pixel tolerance.

PS>


$options = [OfficeIMO.Pdf.PdfVisualComparisonOptions]::new(); $options.AllowedDifferenceRatio = 0.001; Compare-OfficePdfVisual -ReferencePath .\Expected.pdf -DifferencePath .\Actual.pdf -PageRange '1-3' -Options $options
        

Returns per-page difference ratios, images, and diagnostics.

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.

Syntax

Compare-OfficePdfVisual -DifferencePath <String> [-DifferenceReadOptions <PdfReadOptions>] [-Options <PdfVisualComparisonOptions>] [-PageRange <String>] -ReferencePath <String> [-ReferenceReadOptions <PdfReadOptions>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

DifferencePath String requiredposition: 1pipeline: False
Actual PDF path.
DifferenceReadOptions PdfReadOptions optionalposition: namedpipeline: False
Optional bounded read settings for the actual document.
Options PdfVisualComparisonOptions optionalposition: namedpipeline: False
Optional render, tolerance, alignment, background, and ignored regions.
PageRange String optionalposition: namedpipeline: False
Optional one-based ranges such as 1-3,5.
ReferencePath String requiredposition: 0pipeline: False
Expected PDF path.
ReferenceReadOptions PdfReadOptions optionalposition: namedpipeline: False
Optional bounded read settings for the expected document.

Outputs

OfficeIMO.Pdf.PdfVisualComparisonReport