# New-OfficePdfVisualComparisonOptions

Creates discoverable rendering and tolerance settings for Compare-OfficePdfVisual.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Pdf.PdfVisualComparisonOptions`

**Source**

[NewOfficePdfVisualComparisonOptionsCommand.cs:16](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/NewOfficePdfVisualComparisonOptionsCommand.cs#L16) 

Creates discoverable rendering and tolerance settings for Compare-OfficePdfVisual.

## Syntax

```
New-OfficePdfVisualComparisonOptions
[-Alignment <TopLeft|Center>]
[-AllowedDifferenceRatio <Double>]
[-BackgroundColor <String>]
[-ChannelTolerance <Byte>]
[-MaxPages <Int32>]
[-MaxPixelsPerImage <Int64>]
[-MaxTotalOutputBytes <Int64>]
[-MaxTotalPixels <Int64>]
[-Scale <Double>]
[<CommonParameters>]
```

[#](#method-new-officepdfvisualcomparisonoptions-pdfvisualpagealignment-double-string-byte-int32-int64-int64-int64-double)

Parameter set: `All Parameter Sets`

## Examples

### Compare PDFs with a small rendering tolerance.

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

## Parameters

**-Alignment PdfVisualPageAlignment optional**

Page alignment used for differently sized renders.

Possible values: `TopLeft`, `Center`

**-AllowedDifferenceRatio Double optional**

Maximum differing-pixel ratio treated as equal.

**-BackgroundColor String optional**

Background color name or hex value.

**-ChannelTolerance Byte optional**

Maximum per-channel byte difference treated as equal.

**-MaxPages Int32 optional**

Maximum pages compared.

**-MaxPixelsPerImage Int64 optional**

Maximum pixels accepted per rendered image.

**-MaxTotalOutputBytes Int64 optional**

Maximum total bytes retained for comparison artifacts.

**-MaxTotalPixels Int64 optional**

Maximum pixels accepted across the comparison.

**-Scale Double optional**

Render scale applied before comparison.

## 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).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:0DB7A5093F145F0B094789B11A6A1E05B95525DF41DBB4478676E585F705BBC3 -->
