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

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

This method returns the [ComparisonResult](/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult) 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](/fine-reader/engine/api-reference/document-related-objects/frpage) object that contains the original page to be compared. This parameter must not be NULL.

UserPage

\[in] Refers to the [FRPage](/fine-reader/engine/api-reference/document-related-objects/frpage) 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](/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult) object.

## Return values

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

## See also

[Comparator](/fine-reader/engine/api-reference/document-comparison-objects/comparator)
