CreateTextComparisonReportA
Small Business、比較報告
需要 Small Business 版本。在 Delphi、C++Builder 與 Lazarus 程式碼中,請以 TPDFlibSmallBusiness(PDFlibSmallBusiness 單元)或 TPDFlibEnterprise 建立程式庫;Small Business 與 Enterprise 的 DLL 和 ActiveX 組建原樣提供。Single 版保留此方法,方法會傳回空字串,並將 LastErrorCode 設為 901(PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)
需要 Small Business 或 Enterprise 版;單純的 TPDFlib 回傳空字串並設錯誤 901
描述
結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 CreateTextComparisonReport 相同,字串引數以目前的 SetAnsiMode 字碼頁解讀
語法
Delphi
Function DLCreateTextComparisonReportA(InstanceID: Integer; OtherFileName: PAnsiChar; Password: PAnsiChar; Granularity: Integer; ReportFormat: Integer): PAnsiChar;
DLL
const char* DLCreateTextComparisonReportA(int InstanceID, const char* OtherFileName, const char* Password, int Granularity, int ReportFormat);
將選取的文件與另外載入的基準檔比較,不會取代選取的文件;Granularity 為 0(詞)或 1(行),ReportFormat 為 0(HTML)或 1(JSON)
HTML 報告以並排欄位呈現轉義後的基準與目前文字;它不會執行文件文字中的標記
JSON 信封包含 schemaVersion:1、status、comparisonKind:"extracted-text"、complete 與底層的 comparison 物件
不完整的比較在兩種格式中都可見;這些報告比較的是擷取文字,不比較頁面外觀、圖像內容或版面
作業錯誤會回傳錯誤報告並設錯誤 905;有效的比較報告即使含有差異或不完整比較也設錯誤 0
Report:= PDF.CreateTextComparisonReport('baseline.pdf', '', 0, 0);
DLL 與 Dylib 提供 DLCreateTextComparisonReport 及其 A 變體;ActiveX 使用 IPDFlibrary8 或 CoPDFlibrary.CreateEditionTools8
SaveTextComparisonPDF · CompareTextBaselineBatch · CompareDocumentTextsWith