CreateTextComparisonReportA
Small Business, comparison reports
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 an empty string and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)
Requires Small Business or Enterprise; a plain TPDFlib returns an empty string with error 901
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to CreateTextComparisonReport and string arguments are interpreted using the current SetAnsiMode code page
Syntax
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);
Compares the selected document with a separately loaded baseline file without replacing the selected document; Granularity is 0 for words or 1 for lines, and ReportFormat is 0 for HTML or 1 for JSON
The HTML report presents escaped baseline and current text in parallel columns; it cannot execute markup found in document text
The JSON envelope contains schemaVersion:1, status, comparisonKind:"extracted-text", complete and the underlying comparison object
Incomplete comparison remains visible in both formats; these reports compare extracted text, without comparing page appearance, image content or layout
Operational errors return an error report and set error 905; a valid comparison report sets error 0 even when it contains differences or incomplete comparison
Report:= PDF.CreateTextComparisonReport('baseline.pdf', '', 0, 0);
DLL and Dylib provide DLCreateTextComparisonReport and its A variant; ActiveX uses IPDFlibrary8 or CoPDFlibrary.CreateEditionTools8
SaveTextComparisonPDF · CompareTextBaselineBatch · CompareDocumentTextsWith