API Reference

Cmdlet

New-OfficePdfVisualComparisonOptions

Namespace PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Pdf.PdfVisualComparisonOptions

Creates discoverable rendering and tolerance settings for Compare-OfficePdfVisual.

Remarks

Creates discoverable rendering and tolerance settings for Compare-OfficePdfVisual.

Examples

Authored help example

Compare PDFs with a small rendering tolerance.

PS>


$options = New-OfficePdfVisualComparisonOptions -ChannelTolerance 2 -AllowedDifferenceRatio 0.001 -MaxPages 50
            Compare-OfficePdfVisual -ReferencePath .\Expected.pdf -DifferencePath .\Actual.pdf -Options $options
        

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

New-OfficePdfVisualComparisonOptions [-Alignment <TopLeft|Center>] [-AllowedDifferenceRatio <Double>] [-BackgroundColor <String>] [-ChannelTolerance <Byte>] [-MaxPages <Int32>] [-MaxPixelsPerImage <Int64>] [-MaxTotalOutputBytes <Int64>] [-MaxTotalPixels <Int64>] [-Scale <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Alignment PdfVisualPageAlignment optionalposition: namedpipeline: Falsevalues: 2
Page alignment used for differently sized renders.
Possible values: TopLeft, Center
AllowedDifferenceRatio Double optionalposition: namedpipeline: False
Maximum differing-pixel ratio treated as equal.
BackgroundColor String optionalposition: namedpipeline: False
Background color name or hex value.
ChannelTolerance Byte optionalposition: namedpipeline: False
Maximum per-channel byte difference treated as equal.
MaxPages Int32 optionalposition: namedpipeline: False
Maximum pages compared.
MaxPixelsPerImage Int64 optionalposition: namedpipeline: False
Maximum pixels accepted per rendered image.
MaxTotalOutputBytes Int64 optionalposition: namedpipeline: False
Maximum total bytes retained for comparison artifacts.
MaxTotalPixels Int64 optionalposition: namedpipeline: False
Maximum pixels accepted across the comparison.
Scale Double optionalposition: namedpipeline: False
Render scale applied before comparison.

Outputs

OfficeIMO.Pdf.PdfVisualComparisonOptions