←Select platform

Text Property

Summary

The text for the difference.

Syntax
C#
C++/CLI
Python
[DataMemberAttribute(Name="text")] 
public string Text { get; set; } 
public:  
   [DataMemberAttribute(Name=L"text")] 
   property String^ Text 
   { 
      String^ get() 
      void set(String^ value) 
   } 
Text # get and set (TextDifference) 

Property Value

A string containing all the text for the 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.