# PdfVisualComparisonReport

Rendered visual and structural comparison report for two PDFs.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

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

**Modifiers**

sealed

Rendered visual and structural comparison report for two PDFs.

## Inheritance

- object
- PdfVisualComparisonReport

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Compare two PDF files visually](/pdf/compare/) Guide
  
  Compare two PDFs locally, review structural findings, and download an HTML gallery containing expected, actual, and highlighted page-difference images.

## Usage

Explore 3 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 3

- Method [PdfDocumentProof.CompareVisual](/api/pdf/officeimo-pdf-pdfdocumentproof/#method-comparevisual-byte-officeimo-pdf-pdfpageselection-officeimo-pdf-pdfvisualcomparisonoptions-officeimo-pdf-pdfloadoptions)
- Method [PdfVisualComparer.Compare](/api/pdf/officeimo-pdf-pdfvisualcomparer/#method-compare-byte-byte-officeimo-pdf-pdfpageselection-officeimo-pdf-pdfvisualcomparisonoptions-officeimo-pdf-pdfloadoptions-officeimo-pdf-pdfloadoptions)
- 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)

Filter members 

Show inherited

## Methods

ToHtmlGallery 2 overloads

`public string ToHtmlGallery(string? title = null)` [#](#method-tohtmlgallery-string)

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

Builds a self-contained HTML human-review gallery with expected, actual, and highlighted diff images.

Parameters

**title string? = null optional**

Returns

`string`

`public string ToHtmlGallery(string? title, long maximumOutputBytes, CancellationToken cancellationToken = default)` [#](#method-tohtmlgallery-string-int64-threading-cancellationtoken)

[PdfVisualComparisonReport.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L65)

Builds a self-contained HTML gallery without allowing its UTF-8 representation to exceed the supplied byte limit.

Parameters

**title string? required**

**maximumOutputBytes long required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`string`

## 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 int ExpectedPageCount { get; }` [#](#property-expectedpagecount)

[PdfVisualComparisonReport.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L24)

Total pages in the expected document, including pages outside a selected comparison.

`public int ActualPageCount { get; }` [#](#property-actualpagecount)

[PdfVisualComparisonReport.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L26)

Total pages in the actual document, including pages outside a selected comparison.

`public IReadOnlyList<int> ExpectedPageNumbers { get; }` [#](#property-expectedpagenumbers)

[PdfVisualComparisonReport.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L29)

Ordered expected source pages in the comparison scope, including unmatched pages and repeats.

`public IReadOnlyList<int> ActualPageNumbers { get; }` [#](#property-actualpagenumbers)

[PdfVisualComparisonReport.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L31)

Ordered actual source pages in the comparison scope, including unmatched pages and repeats.

`public IReadOnlyList<int> UnmatchedExpectedPageNumbers { get; }` [#](#property-unmatchedexpectedpagenumbers)

[PdfVisualComparisonReport.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L33)

Selected expected pages with no selected actual partner.

`public IReadOnlyList<int> UnmatchedActualPageNumbers { get; }` [#](#property-unmatchedactualpagenumbers)

[PdfVisualComparisonReport.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L35)

Selected actual pages with no selected expected partner.

`public string ExpectedSha256 { get; }` [#](#property-expectedsha256)

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

SHA-256 of the exact expected PDF snapshot compared.

`public string ActualSha256 { get; }` [#](#property-actualsha256)

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

SHA-256 of the exact actual PDF snapshot compared.

`public bool IsSelectedScope { get; }` [#](#property-isselectedscope)

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

True when the caller explicitly selected a comparison scope.

`public IReadOnlyList<PdfVisualPageComparison> Pages { get; }` [#](#property-pages)

[PdfVisualComparisonReport.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L44)

Per-page comparisons in selected sequence order, retaining original source page numbers.

`public IReadOnlyList<string> StructuralDifferences { get; }` [#](#property-structuraldifferences)

[PdfVisualComparisonReport.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L46)

Document/page structural differences.

`public bool IsMatch { get; }` [#](#property-ismatch)

[PdfVisualComparisonReport.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L48)

True when all compared pages have complete managed renderings that satisfy thresholds and no structural differences remain.

`public int DifferentPageCount { get; }` [#](#property-differentpagecount)

[PdfVisualComparisonReport.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L51)

Compared page pairs with complete managed renderings that fail the configured visual thresholds.

`public int IncompletePageCount { get; }` [#](#property-incompletepagecount)

[PdfVisualComparisonReport.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Rendering/PdfVisualComparisonReport.cs#L53)

Compared page pairs whose managed rendering is incomplete, so their pixels cannot establish a visual match or difference.

<!-- PowerForge markdown artifact sha256:3272F01E0130866C08DCF0FADF009599B32C4BD2C889126EBF288C1CA0A4DEAB -->
