ComparePageTextsWith
Page manipulation
Requires the Small Business edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibSmallBusiness (unit PDFlibSmallBusiness) or TPDFlibEnterprise; the Small Business and Enterprise DLL and ActiveX builds provide it unchanged; the Single edition keeps the method, which returns 0 and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)
Description
Compares two documents page by page on extracted text
Syntax
Delphi
Function ComparePageTextsWith(Other: TPDFlib; Out FirstDifferentPage, ThisPageCount, OtherPageCount: Integer): Integer; Virtual;ActiveX
Function PDFlib::ComparePageTextsWith(Other As Object, ByRef FirstDifferentPage As Long, ByRef ThisPageCount As Long, ByRef OtherPageCount As Long) As LongDLL
int DLComparePageTextsWith(int InstanceID, int OtherInstanceID, int* FirstDifferentPage, int* ThisPageCount, int* OtherPageCount);Parameters
| Other | The second document, loaded in its own library instance. The DLL and the Dylib take the instance handle DLCreateLibrary returned for it as OtherInstanceID; Automation takes the other control object |
|---|---|
| FirstDifferentPage | First page whose text differs, or 0 when all shared pages match |
| ThisPageCount, OtherPageCount | The page counts of both documents |
Return values
The number of pages whose extracted text differs; differing page counts surface through the count parameters
Remarks
Comparison uses raw extraction (option 8) so whitespace layout influences the result