> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ComparePages Method of the Comparator Object

> ComparePages method of the Comparator Object in the ABBYY FineReader Engine API — This method compares a page from the original document with its copy.

This method compares a page from the original document with its copy. Both pages should already have been recognized using, for example, the [ProcessPages](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frdocument/processpages-method.md) method of the [FRDocument](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frdocument.md) object (or another method that performs document synthesis).

This method returns the [ComparisonResult](https://docs.abbyy.com/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult.md) object that contains all the changes made to the page.

## Syntax

### C++

```cpp theme={null}
HRESULT ComparePages(
  IFRPage*            RefPage,
  IFRPage*            UserPage,
  IComparisonResult** Result
);
```

### C\#

```csharp theme={null}
IComparisonResult ComparePages(
  IFRPage             RefPage,
  IFRPage             UserPage
);
```

### Visual Basic .NET

```vb theme={null}
Function ComparePages( _
  RefPage As IFRPage, _
  UserPage As IFRPage _  
) As IComparisonResult
```

## Parameters

RefPage

\[in] Refers to the [FRPage](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frpage.md) object that contains the original page to be compared. This parameter must not be NULL.

UserPage

\[in] Refers to the [FRPage](https://docs.abbyy.com/fine-reader/engine/api-reference/document-related-objects/frpage.md) object that contains the page copy to be compared. This parameter must not be NULL.

Result

\[out, retval] A pointer to IComparisonResult\* pointer variable that receives the interface pointer of the output [ComparisonResult](https://docs.abbyy.com/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult.md) object.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](https://docs.abbyy.com/fine-reader/engine/api-reference/return-codes.md).

## See also

[Comparator](https://docs.abbyy.com/fine-reader/engine/api-reference/document-comparison-objects/comparator.md)
