←Select platform

TextDifference Class

Summary

Object for holding text-comparison information.

Syntax
C#
C++/CLI
Python
[SerializableAttribute()] 
[DataContractAttribute()] 
public class TextDifference : Difference 
public: 
   [SerializableAttribute,  
   DataContractAttribute] 
   ref class TextDifference : Difference 
class TextDifference(Difference): 
Example
C#
using Leadtools.Document; 
using Leadtools.Document.Compare; 
using Leadtools; 
 
 
public void CompareTextDocumentPageTextExample() 
{ 
   var doc1 = DocumentFactory.LoadFromFile(pathToDocument1, new LoadDocumentOptions()); 
   var doc2 = DocumentFactory.LoadFromFile(pathToDocument2, new LoadDocumentOptions()); 
 
   var textList = new List<DocumentPageText>() 
   { 
      doc1.Pages.First().GetText(), 
      doc2.Pages.First().GetText() 
   }; 
 
   var comparer = new DocumentComparer(); 
   var diffs = comparer.CompareText(textList); 
 
   foreach (TextDifference diff in diffs) 
   { 
      Console.WriteLine($"Operations: {diff.Operation}"); 
      Console.WriteLine($"Text: {diff.Text}"); 
      Console.WriteLine("--------"); 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2023.5.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Compare Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.