TextPdfComparer
Overview
TextPdfComparer is a class in Aspose.PDF FOSS for .NET.
Compares the text of two documents.
This class declares 10 methods for TextPdfComparer objects in .NET programs.
Available methods include: AssemblyDestinationPageText, AssemblySourcePageText, CompareDocumentsPageByPage, CompareFlatDocuments, ComparePages, CreateComparisonStatistics, TextPdfComparer.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Methods
| Signature | Description |
|---|---|
TextPdfComparer() | Creates a comparer. |
CompareDocumentsPageByPage(document1: Document, document2: Document, options: ComparisonOptions) | Compare page by page: page n of the first document against page n of the second, a missing page reading as empty text. |
CompareDocumentsPageByPage(document1: Document, document2: Document, options: ComparisonOptions, resultPdfDocumentPath: string) | Compare page by page and also render the result to resultPdfDocumentPath. |
CompareFlatDocuments(document1: Document, document2: Document, options: ComparisonOptions) | Compare the two documents as one text each - every page’s text joined in order - so a change that moves across a page boundary reads as one edit. |
CompareFlatDocuments(document1: Document, document2: Document, options: ComparisonOptions, resultPdfDocumentPath: string) | Compare flat and also render the result to resultPdfDocumentPath. |
ComparePages(page1: Page?, page2: Page?, options: ComparisonOptions) | Compare the text of two pages. |
CreateComparisonStatistics(diffs: List<DiffOperation>) | Counts over one edit list. |
CreateComparisonStatistics(diffs: List<List<DiffOperation>>) | Counts over a per-page edit list: each page’s own counts, and the document total across them. |
AssemblySourcePageText(diffs: List<DiffOperation>) | Rebuild the first text from an edit list (equal and deleted runs). |
AssemblyDestinationPageText(diffs: List<DiffOperation>) | Rebuild the second text from an edit list (equal and inserted runs). |