←Select platform

Characters Property

Summary

List of PageCharacters in the difference set.

Syntax
C#
C++/CLI
Python
[DataMemberAttribute(Name="characters")] 
public IList<PageCharacter> Characters { get; set; } 
public:  
   [DataMemberAttribute(Name=L"characters")] 
   property IList<PageCharacter^>^ Characters 
   { 
      IList<PageCharacter^>^ get() 
      void set(IList<PageCharacter^>^ value) 
   } 
Characters # get and set (PageCharactersDifference) 

Property Value

List of PageCharacters. Default value is an empty list.

Example
C#
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("--------"); 
   } 
} 
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.