public DocumentDifference CompareDocument(
IList<LEADDocument> documents
)
Public Function CompareDocument(
ByVal documents As IList(Of LEADDocument
)) As DocumentDifference
public:
DocumentDifference^ CompareDocument(
IList<LEADDocument^>^ documents
)
documents
The LEADDocuments to compare.
A DocumentDifference object.
using Leadtools.Document;
using Leadtools.Document.Compare;
using Leadtools;
public void CompareDocumentExample()
{
var doc1 = DocumentFactory.LoadFromFile(pathToDocument1, new LoadDocumentOptions());
var doc2 = DocumentFactory.LoadFromFile(pathToDocument2, new LoadDocumentOptions());
var docList = new List<LEADDocument>()
{
doc1,
doc2
};
var comparer = new DocumentComparer();
var diffs = comparer.CompareDocument(docList);
Console.WriteLine($"Total number of differences: {diffs.Differences.Count}");
Console.WriteLine($"Total number of insertions: {diffs.GetInsertions().Count}");
Console.WriteLine($"Total number of deletions: {diffs.GetDeletions().Count}");
foreach (PageCharactersDifference diff in diffs.Differences)
{
Console.WriteLine($"Operations: {diff.Operation}");
Console.WriteLine($"Text: {diff.Text}");
foreach (PageCharacter pageChar in diff.Characters)
{
Console.WriteLine($" Character: {pageChar.Character}");
Console.WriteLine($" Character Index: {pageChar.CharacterIndex}");
Console.WriteLine($" Page Number: {pageChar.PageNumber}");
Console.WriteLine($" Wordmap Index: {pageChar.WordMapIndex}");
}
Console.WriteLine("--------");
}
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document