ComparePageTextsWith
页面操作
需要 Small Business 版。在 Delphi、C++Builder 和 Lazarus 代码中,请将库创建为 TPDFlibSmallBusiness(单元 PDFlibSmallBusiness)或 TPDFlibEnterprise;Small Business 版和 Enterprise 版的 DLL 与 ActiveX 构建原样提供该类。Single 版保留此方法,它返回 0、空字符串或 False,并将 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 LongDLL
int DLComparePageTextsWith(int InstanceID, int OtherInstanceID, int* FirstDifferentPage, int* ThisPageCount, int* OtherPageCount);参数
| Other | 第二个文档,加载到其自身的库实例中;DLL 与 Dylib 以 DLCreateLibrary 为其返回的实例句柄作为 OtherInstanceID,Automation 则传入另一个控件对象 |
|---|---|
| FirstDifferentPage | 首个文本不同的页面,所有共有页面均匹配时为 0 |
| ThisPageCount, OtherPageCount | 两个文档的页数 |
返回值
提取文本不同的页面数;不同的页面计数通过计数参数体现
备注
比较使用原始提取(选项 8),因此空白布局会影响结果