ComparePageTextsWith

頁面操作

需要 Small Business 版本。在 Delphi、C++Builder 與 Lazarus 程式碼中,請以 TPDFlibSmallBusiness(PDFlibSmallBusiness 單元)或 TPDFlibEnterprise 建立程式庫;Small Business 與 Enterprise DLL 及 ActiveX 組建原樣提供。Single 版本保留此方法,方法會傳回 0,並將 LastErrorCode 設為 901(PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

描述

以擷取的文字逐頁比較兩份文件

語法

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 Long

DLL

int DLComparePageTextsWith(int InstanceID, int OtherInstanceID, int* FirstDifferentPage, int* ThisPageCount, int* OtherPageCount);

參數

Other第二份文件,載入於它自己的程式庫執行個體中。DLL 與 Dylib 以為其傳回的實例控制代碼 DLCreateLibrary 作為 OtherInstanceID;Automation 則傳入另一個控制項物件
FirstDifferentPage第一個文字不同的頁面;所有共有頁面都相符則為 0
ThisPageCount, OtherPageCount兩份文件的頁數

傳回值

擷取文字不同的頁數;差異頁數透過 count 參數呈現

備註

比較採用原始擷取(選項 8),空白版面會影響結果

另請參閱

GetPageText, ComparePreflightReports