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

# Migrate from ScanDifFinder SDK to Document Comparison API

> Migration guide for moving ABBYY ScanDifFinder SDK code to the new Document Comparison API in ABBYY FineReader Engine on Windows, including API mapping.

<Note>
  This topic applies to FRE for Windows.
</Note>

This section is intended to help you upgrade your code using ABBYY ScanDifFinder SDK to a new Document Comparison API that is implemented in ABBYY FineReader Engine.

ABBYY ScanDifFinder SDK:

* Uses built-in recognition mechanisms for the documents processing
* Compares a file with its copy and saves the result as the page images

ABBYY FineReader Engine with the Document Comparison API:

* Uses a full range of ABBYY FineReader Engine methods to prepare the documents for comparison
* Requires usage of the documents or pages that were recognized using ABBYY FineReader Engine
* Compares a document or selected range of pages with their copies and exports the result to an XML or DOCX format

In this release the Document Comparison API does not support:

* [PictureChange Object](/fine-reader/engine/api-reference/document-comparison-objects/picturechange)

This object will be implemented in future releases.

## Samples

ABBYY ScanDifFinder SDK and Document Comparison API use widely different methods to compare the files. The samples below illustrate this difference.

ABBYY ScanDifFinder SDK code sample

<Accordion title="C# code">
  ```csharp theme={null}
  //Specify the paths to the documents to be compared,
  //and the path for the comparison result
   
  try
  {
      string refFile = Path.GetFullPath( args[0] );
      string userFile = Path.GetFullPath( args[1] );
      ScanDifFinder difFinder = new ScanDifFinder();
      difFinder.TempDir = tempDir;
      ProcessFiles( difFinder, refFile, userFile );
  }
  catch (Exception)
  {
  }
  finally
  {
      if (Directory.Exists( tempDir ))
      Directory.Delete( tempDir, true );
  }
  ```
</Accordion>

Document Comparison API sample

<Accordion title="C# code">
  ```csharp theme={null}
  // Perform full processing of reference document
  FREngine.FRDocument referenceFRDocument = engine.CreateFRDocument();
  referenceFRDocument.AddImageFile( "C:\\ReferenceDocument.pdf", null, null );
  referenceFRDocument.Process( dpParams );
  // Perform full processing of user document
  FREngine.FRDocument userFRDocument = engine.CreateFRDocument();
  userFRDocument.AddImageFile( "C:\\UserDocument.pdf", null, null );
  userFRDocument.Process( dpParams );
  // Perform comparison
  FREngine.IComparator comparator = engineLoader.Engine.CreateComparator();
  FREngine.IComparisonResult comparisonResult = 
      comparator.CompareDocuments( referenceFRDocument, userFRDocument, null, null );
  FREngine.IChanges changes = comparisonResult.Changes;
  // Work with the comparison result
  foreach (FREngine.IChange change in changes)
  {
  FREngine.IChangeLocation userLocation = change.UserLocation;
  FREngine.IChangePosition userChangeStartPosition = userLocation.StartPosition;
  FREngine.IChangePosition userChangeEndPosition = userLocation.EndPosition;
  }
  // Export the result to a file of the specified format
  comparisonResult.Export( "C:\\ComparisonResult.xml", FREngine.ComparatorExportFormatEnum.CEF_Xml, null );
  ```
</Accordion>

## API Comparison

The methods and properties of ABBYY FineReader Engine, that replace the methods and properties of ABBYY ScanDifFinder SDK, are described in the table below.

<table><thead><tr><th><p><strong>Object/Enumeration of ABBYY ScanDifFinder SDK</strong></p></th><th><p><strong>Property/Method</strong></p></th><th><p><strong>Replacing Methods/Properties from ABBYY FineReader Engine</strong></p></th></tr></thead><tbody><tr><td rowspan="7"><p><strong>ScanDifFinder Class</strong></p></td><td><br /></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparator">Comparator</a> </strong>object<strong> </strong>instead<strong> </strong>as the main object for documents or pages comparison.</p></td></tr><tr><td><p><strong>CompareFiles</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparator/comparedocuments-method">CompareDocuments</a></strong> method for the document comparison and <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparator/comparepages-method">ComparePages</a></strong> method for the pages comparison.</p></td></tr><tr><td><p><strong>ImageSettingsForExportedImages</strong></p></td><td><p>Saving images is performed with ABBYY FineReader Engine methods, for example, with the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/image/writetofile-method">WriteToFile</a></strong> method of the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/image">Image</a> </strong>object.</p></td></tr><tr><td><p><strong>Languages</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/recognizerparams/setpredefinedtextlanguage-method">SetPredefinedTextLanguage</a></strong> method of the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/recognizerparams">RecognizerParams</a></strong> object.</p></td></tr><tr><td><p><strong>Options</strong></p></td><td><p>Use the properties of the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/prepareimagemode">PrepareImageMode</a></strong>, <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/pageprocessingparams">PageProcessingParams</a></strong> and <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/objectsextractionparams">ObjectsExtractionParams</a> </strong>objects instead.</p></td></tr><tr><td><p><strong>SetLocalLicenseFile</strong></p></td><td><p>The licensing of the Document Comparison API is performed using ABBYY FineReader Engine (see <a href="/fine-reader/engine/licensing">Licensing</a>).</p></td></tr><tr><td><p><strong>TempDir</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/engine-loaders/iengineloader/initializeengine-method">InitializeEngine</a> </strong>method to specify the path to the folder for ABBYY FineReader Engine temporary files and other additional parameters.</p></td></tr><tr><td rowspan="4"><p><strong>CompareResult Class</strong></p></td><td><br /></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult">ComparisonResult</a> </strong>object instead. To represent the result of comparing the original document or page with its copy, use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult/getchangesforreferencepage-method">GetChangesForReferencePage</a></strong> and <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult/getchangesforuserpage-method">GetChangesForUserPage</a></strong> methods. To export the result to a file, use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonresult/export-method">Export</a> </strong>method.</p></td></tr><tr><td><p><strong>AllChanges</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/changes">Changes</a> </strong>object instead to get the list of all changes that were detected during the document comparison.</p></td></tr><tr><td><p><strong>RefPagesCount</strong></p></td><td rowspan="2"><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-related-objects/frpages#count">Count</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-related-objects/frpages">FRPages</a></strong> object to get the number of pages in a document.</p></td></tr><tr><td><p><strong>UserPagesCount</strong></p></td></tr><tr><td rowspan="6"><p><strong>BaseChange Interface</strong></p></td><td><br /></td><td><p>Use the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/change">Change</a> </strong>object to represent one difference between the original document and its copy. The <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change/getastextchange-method">GetAsTextChange</a></strong> method will help you to get the change made in the document text.</p></td></tr><tr><td><p><strong>ChangeType</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change#changetype">ChangeType</a></strong> and the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change#modificationtype">ModificationType</a></strong> properties of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change">Change</a> </strong>object instead. These properties return the information about the type of the changed content and the kind of modification that was made.</p></td></tr><tr><td><p><strong>RefLocation</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change#referencelocation">ReferenceLocation</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change">Change</a> </strong>object<strong> </strong>instead.</p></td></tr><tr><td><p><strong>RefText</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/textchange#referencetext">ReferenceText</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/textchange">TextChange</a> </strong>object<strong> </strong>instead.</p></td></tr><tr><td><p><strong>UserLocation</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change#userlocation">UserLocation</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/change">Change</a> </strong>object<strong> </strong>instead.</p></td></tr><tr><td><p><strong>UserText</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/textchange#usertext">UserText</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/textchange">TextChange</a> </strong>object<strong> </strong>instead.</p></td></tr><tr><td rowspan="6"><p><strong>Change Interface</strong></p></td><td><br /></td><td><p>Use the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/change">Change</a> </strong>object instead to get the information about one change.</p></td></tr><tr><td><p><strong>Description</strong></p></td><td><p>This property is removed because the Document Comparison API uses another logical structure.</p></td></tr><tr><td><p><strong>EditLength</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/textchange#editlength">EditLength</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/textchange">TextChange</a> </strong>object<strong> </strong>instead.</p></td></tr><tr><td><p><strong>RefDescription</strong></p></td><td rowspan="3"><p>These properties are removed because the Document Comparison API uses another logical structure.</p></td></tr><tr><td><p><strong>SmallChanges</strong></p></td></tr><tr><td><p><strong>UserDescription</strong></p></td></tr><tr><td rowspan="3"><p><strong>ChangeLocation Interface</strong></p></td><td><br /></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/changelocation">ChangeLocation</a> </strong>object to get information about the location of the change.</p></td></tr><tr><td><p><strong>GetRelativeChangePosition</strong></p></td><td rowspan="2"><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/changelocation/regionforpage-property">RegionForPage</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/changelocation/regionforpage-property">ChangeLocation</a></strong> object instead. This property returns the region of the change on the specified page.</p></td></tr><tr><td><p><strong>PageIndex</strong></p></td></tr><tr><td rowspan="12"><p><strong>ComparisonOptions Class</strong></p></td><td><br /></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object instead.</p></td></tr><tr><td><p><strong>DoNotUsePdfTextLayer</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/objectsextractionparams#sourcecontentreusemode">SourceContentReuseMode</a> </strong>property<strong> </strong>of the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/objectsextractionparams">ObjectsExtractionParams</a></strong> object, which has been set to CRM\_DoNotReuse, instead. This property specifies how to use the text and image layers of the source PDF file.</p></td></tr><tr><td><p><strong>DoubleColumnsMode</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams#usedoublelanguageagreementmode">UseDoubleLanguageAgreementMode</a> </strong>property of the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object instead.</p><Note>UseDoubleLanguageAgreementMode is not currently implemented.</Note></td></tr><tr><td><p><strong>EnhanceLocalContrast</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/imagedocument/enhancelocalcontrast-method">EnhanceLocalContrast</a></strong> method of the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/imagedocument">ImageDocument</a></strong> object.</p></td></tr><tr><td><p><strong>FastMode</strong></p></td><td><p>This property is removed because the Document Comparison API uses another logical structure.</p></td></tr><tr><td><p><strong>IgnoreColorObjects</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/pageprocessingparams#prohibitcolorobjectsatprocessing">ProhibitColorObjectsAtProcessing</a></strong> property of the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/pageprocessingparams">PageProcessingParams</a></strong> object instead. This property specifies if color objects must be filtered out on the image before layout analysis and recognition.</p></td></tr><tr><td><p><strong>IgnoreOcrErrors</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams#correctocrerrors">CorrectOcrErrors</a> </strong>property of the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object instead.</p></td></tr><tr><td><p><strong>IgnoreOneLetterNonDigits</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams#detectoneletternondigitchanges">DetectOneLetterNonDigitChanges</a> </strong>property of the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object instead.</p></td></tr><tr><td><p><strong>IgnorePunctuators</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams#detectpunctuatorchanges">DetectPunctuatorChanges</a> </strong>property of the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object instead.</p></td></tr><tr><td><p><strong>IgnoreRunningTitles</strong></p></td><td><p>Use the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams#detectrunningtitlechanges">DetectRunningTitleChanges</a></strong> property of the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object instead.</p></td></tr><tr><td><p><strong>IgnoreWhiteSpaces</strong></p></td><td><p>This property was modified and performs another function now (see the <strong><a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams#detectwhitespacechanges">DetectWhiteSpaceChanges</a> </strong>property of the<strong> <a href="/fine-reader/engine/api-reference/document-comparison-objects/comparisonparams">ComparisonParams</a></strong> object).</p></td></tr><tr><td><p><strong>ProcessDocumentAsOneLineText</strong></p></td><td><p>This property is removed because the Document Comparison API uses another logical structure.</p></td></tr><tr><td rowspan="5"><p><strong>ImageSettings Class</strong></p></td><td><p><strong>ColorType</strong></p></td><td rowspan="5"><p>Saving images is performed with ABBYY FineReader Engine methods, for example, with the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/image/writetofile-method">WriteToFile</a></strong> method of the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/image">Image</a> </strong>object.</p></td></tr><tr><td><p><strong>CompressionType</strong></p></td></tr><tr><td><p><strong>Extension</strong></p></td></tr><tr><td><p><strong>Format</strong></p></td></tr><tr><td><p><strong>Resolution</strong></p></td></tr><tr><td rowspan="2"><p><strong>RecognitionLanguage Class</strong></p></td><td><p><strong>DisplayName</strong></p></td><td rowspan="2"><p>Use the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/recognizerparams/setpredefinedtextlanguage-method">SetPredefinedTextLanguage</a></strong> method of the <strong><a href="/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/recognizerparams">RecognizerParams</a></strong> object.</p></td></tr><tr><td><p><strong>Language</strong></p></td></tr><tr><td><p><strong>ChangeTypeEnum Enumeration</strong></p></td><td><br /></td><td><p>Use <strong><a href="/fine-reader/engine/api-reference/enumerations/modificationtypeenum">ModificationTypeEnum</a> </strong>and<strong> <a href="/fine-reader/engine/api-reference/enumerations/documentchangetypeenum">DocumentChangeTypeEnum</a> </strong>instead. These enumerations specify the kind of modification made to the document content and the type of the changed content.</p></td></tr><tr><td><p><strong>ColorTypeEnum Enumeration</strong></p></td><td rowspan="4"><br /></td><td rowspan="4"><p>Saving images is performed with ABBYY FineReader Engine methods, for example, with the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/image/writetofile-method">WriteToFile</a></strong> method of the <strong><a href="/fine-reader/engine/api-reference/image-related-objects/image">Image</a> </strong>object.</p></td></tr><tr><td><p><strong>CompressionTypeEnum Enumeration</strong></p></td></tr><tr><td><p><strong>FileFormatEnum Enumeration</strong></p></td></tr><tr><td><p><strong>LanguageEnum Enumeration</strong></p></td></tr></tbody></table>

## See also

[Document Comparison Objects](/fine-reader/engine/api-reference/document-comparison-objects)
