# PdfVisualComparisonOptions

Options for dependency-free rendered PDF comparison.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfVisualComparisonOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L37)

**Modifiers**

sealed

Options for dependency-free rendered PDF comparison.

## Inheritance

- object
- PdfVisualComparisonOptions

## Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [PdfReviewComparisonOptions.Visual](/api/pdf/officeimo-pdf-pdfreviewcomparisonoptions/#property-visual)

### Accepted by parameters 5

- Method [PdfDocumentProof.CompareVisual](/api/pdf/officeimo-pdf-pdfdocumentproof/#method-comparevisual-byte-officeimo-pdf-pdfpageselection-officeimo-pdf-pdfvisualcomparisonoptions-officeimo-pdf-pdfloadoptions) parameter `options`
- Method [PdfDocumentProof.CompareVisualPages](/api/pdf/officeimo-pdf-pdfdocumentproof/#method-comparevisualpages-int32-officeimo-pdf-pdfdocument-int32-officeimo-pdf-pdfvisualcomparisonoptions-threading-cancellationtoken) parameter `options`
- Method [PdfVisualComparer.Compare](/api/pdf/officeimo-pdf-pdfvisualcomparer/#method-compare-byte-byte-officeimo-pdf-pdfpageselection-officeimo-pdf-pdfvisualcomparisonoptions-officeimo-pdf-pdfloadoptions-officeimo-pdf-pdfloadoptions) parameter `options`
- Method [PdfVisualComparer.CompareImages](/api/pdf/officeimo-pdf-pdfvisualcomparer/#method-compareimages-collections-generic-ireadonlylist-system-byte-collections-generic-ireadonlylist-system-byte-officeimo-pdf-pdfvisualcomparisonoptions-threading-cancellationtoken) parameter `options`
- Method [PdfVisualComparer.ComparePages](/api/pdf/officeimo-pdf-pdfvisualcomparer/#method-comparepages-byte-int32-byte-int32-officeimo-pdf-pdfvisualcomparisonoptions-officeimo-pdf-pdfloadoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

`public PdfVisualComparisonOptions()` [#](#constructor-ctor)

[PdfVisualComparisonOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L37)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public double Scale { get; set; }` [#](#property-scale)

[PdfVisualComparisonOptions.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L39)

Render scale.

`public byte ChannelTolerance { get; set; }` [#](#property-channeltolerance)

[PdfVisualComparisonOptions.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L41)

Maximum per-channel difference treated as equal, from 0 through 255.

`public double AllowedDifferenceRatio { get; set; }` [#](#property-alloweddifferenceratio)

[PdfVisualComparisonOptions.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L43)

Maximum changed-pixel ratio accepted as equal, from 0 through 1.

`public PdfVisualPageAlignment Alignment { get; set; }` [#](#property-alignment)

[PdfVisualComparisonOptions.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L45)

Alignment for pages with differing dimensions.

`public OfficeColor Background { get; set; }` [#](#property-background)

[PdfVisualComparisonOptions.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L47)

Raster background used for both inputs.

`public IList<PdfPixelRegion> IgnoredRegions { get; }` [#](#property-ignoredregions)

[PdfVisualComparisonOptions.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L49)

Ignored comparison regions in output pixel coordinates. At most 4096 regions are accepted.

`public OfficePageSelector? ExpectedPages { get; set; }` [#](#property-expectedpages)

[PdfVisualComparisonOptions.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L52)

Optional ordered, document-relative expected-page selection. Null selects every expected page.

`public OfficePageSelector? ActualPages { get; set; }` [#](#property-actualpages)

[PdfVisualComparisonOptions.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L54)

Optional ordered, document-relative actual-page selection. Null selects every actual page.

`public int MaxPages { get; set; }` [#](#property-maxpages)

[PdfVisualComparisonOptions.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L56)

Maximum selected pages on either side, including repeated pages.

`public long MaxPixelsPerImage { get; set; }` [#](#property-maxpixelsperimage)

[PdfVisualComparisonOptions.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L58)

Maximum raster pixels allocated for one expected, actual, or diff page image.

`public long MaxTotalPixels { get; set; }` [#](#property-maxtotalpixels)

[PdfVisualComparisonOptions.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L60)

Maximum aggregate raster pixels allocated across the comparison.

`public long MaxTotalOutputBytes { get; set; }` [#](#property-maxtotaloutputbytes)

[PdfVisualComparisonOptions.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L62)

Maximum aggregate PNG bytes retained in the comparison report.

`public bool IgnoreAntialiasing { get; set; }` [#](#property-ignoreantialiasing)

[PdfVisualComparisonOptions.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonOptions.cs#L70)

When true, a pixel above [PdfVisualComparisonOptions.ChannelTolerance](/api/pdf/officeimo-pdf-pdfvisualcomparisonoptions/) does not count as changed if it looks like an edge that moved by less than a pixel: each image's colour lies, within the tolerance, inside the colour range of the other image's 3x3 neighbourhood. Renderers that place the same glyph edges slightly differently then match, while ink added or removed against plain background still counts. The highlighted diff marks ignored pixels in yellow. Pages with different dimensions are compared without this rule.

<!-- PowerForge markdown artifact sha256:6C7E78658E6F68D897074009385FD6C991523D45FBC67CFE7D63202F3A3B0417 -->
