Migration Guide from ScanDifFinder SDK to Document Comparison API
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:
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
C# code
Document Comparison API sample
C# code
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.
Object/Enumeration of ABBYY ScanDifFinder SDK | Property/Method | Replacing Methods/Properties from ABBYY FineReader Engine |
---|---|---|
ScanDifFinder Class | Use the Comparator object instead as the main object for documents or pages comparison. | |
CompareFiles | Use the CompareDocuments method for the document comparison and ComparePages method for the pages comparison. | |
ImageSettingsForExportedImages | Saving images is performed with ABBYY FineReader Engine methods, for example, with the WriteToFile method of the Image object. | |
Languages | Use the SetPredefinedTextLanguage method of the RecognizerParams object. | |
Options | Use the properties of the PrepareImageMode, PageProcessingParams and ObjectsExtractionParams objects instead. | |
SetLocalLicenseFile | The licensing of the Document Comparison API is performed using ABBYY FineReader Engine (see Licensing). | |
TempDir | Use the InitializeEngine method to specify the path to the folder for ABBYY FineReader Engine temporary files and other additional parameters. | |
CompareResult Class | Use the ComparisonResult object instead. To represent the result of comparing the original document or page with its copy, use the GetChangesForReferencePage and GetChangesForUserPage methods. To export the result to a file, use the Export method. | |
AllChanges | Use the Changes object instead to get the list of all changes that were detected during the document comparison. | |
RefPagesCount | Use the Count property of the FRPages object to get the number of pages in a document. | |
UserPagesCount | ||
BaseChange Interface | Use the Change object to represent one difference between the original document and its copy. The GetAsTextChange method will help you to get the change made in the document text. | |
ChangeType | Use the ChangeType and the ModificationType properties of the Change object instead. These properties return the information about the type of the changed content and the kind of modification that was made. | |
RefLocation | Use the ReferenceLocation property of the Change object instead. | |
RefText | Use the ReferenceText property of the TextChange object instead. | |
UserLocation | Use the UserLocation property of the Change object instead. | |
UserText | Use the UserText property of the TextChange object instead. | |
Change Interface | Use the Change object instead to get the information about one change. | |
Description | This property is removed because the Document Comparison API uses another logical structure. | |
EditLength | Use the EditLength property of the TextChange object instead. | |
RefDescription | These properties are removed because the Document Comparison API uses another logical structure. | |
SmallChanges | ||
UserDescription | ||
ChangeLocation Interface | Use the ChangeLocation object to get information about the location of the change. | |
GetRelativeChangePosition | Use the RegionForPage property of the ChangeLocation object instead. This property returns the region of the change on the specified page. | |
PageIndex | ||
ComparisonOptions Class | Use the ComparisonParams object instead. | |
DoNotUsePdfTextLayer | Use the SourceContentReuseMode property of the ObjectsExtractionParams 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. | |
DoubleColumnsMode | Use the UseDoubleLanguageAgreementMode property of the ComparisonParams object instead. | |
EnhanceLocalContrast | Use the EnhanceLocalContrast property of the PrepareImageMode object instead. This property specifies whether the local contrast of the image should be increased. | |
FastMode | This property is removed because the Document Comparison API uses another logical structure. | |
IgnoreColorObjects | Use the ProhibitColorObjectsAtProcessing property of the PageProcessingParams object instead. This property specifies if color objects must be filtered out on the image before layout analysis and recognition. | |
IgnoreOcrErrors | Use the CorrectOcrErrors property of the ComparisonParams object instead. | |
IgnoreOneLetterNonDigits | Use the DetectOneLetterNonDigitChanges property of the ComparisonParams object instead. | |
IgnorePunctuators | Use the DetectPunctuatorChanges property of the ComparisonParams object instead. | |
IgnoreRunningTitles | Use the DetectRunningTitleChanges property of the ComparisonParams object instead. | |
IgnoreWhiteSpaces | This property was modified and performs another function now (see the DetectWhiteSpaceChanges property of the ComparisonParams object). | |
ProcessDocumentAsOneLineText | This property is removed because the Document Comparison API uses another logical structure. | |
ImageSettings Class | ColorType | Saving images is performed with ABBYY FineReader Engine methods, for example, with the WriteToFile method of the Image object. |
CompressionType | ||
Extension | ||
Format | ||
Resolution | ||
RecognitionLanguage Class | DisplayName | Use the SetPredefinedTextLanguage method of the RecognizerParams object. |
Language | ||
ChangeTypeEnum Enumeration | Use ModificationTypeEnum and DocumentChangeTypeEnum instead. These enumerations specify the kind of modification made to the document content and the type of the changed content. | |
ColorTypeEnum Enumeration | Saving images is performed with ABBYY FineReader Engine methods, for example, with the WriteToFile method of the Image object. | |
CompressionTypeEnum Enumeration | ||
FileFormatEnum Enumeration | ||
LanguageEnum Enumeration |
See also
9/17/2024 3:14:41 PM