CompareAuditEvidence
Enterprise, audit evidence
Requires the Enterprise edition. In Delphi, C++Builder and Lazarus code create the library as TPDFlibEnterprise (unit PDFlibEnterprise); the Enterprise DLL and ActiveX builds provide it unchanged. Other editions keep the method, which returns an empty string and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)
Requires Enterprise
Description
Compares two single-file evidence objects produced by CreateAuditEvidence and returns JSON that separates source, policy and library-version changes together with the individual checks that differ
Syntax
Delphi
Function TPDFlib.CompareAuditEvidence(Const OldJSON, NewJSON: WideString): WideString; Virtual;ActiveX
Function PDFlib::CompareAuditEvidence(OldJSON As String, NewJSON As String) As StringDLL
const wchar_t* DLCompareAuditEvidence(int InstanceID, const wchar_t* OldJSON, const wchar_t* NewJSON);
const char* DLCompareAuditEvidenceA(int InstanceID, const char* OldJSON, const char* NewJSON);Parameters
| OldJSON | Earlier valid single-file evidence object returned by CreateAuditEvidence |
|---|---|
| NewJSON | Later valid single-file evidence object returned by CreateAuditEvidence; batch envelopes and operational error objects are not accepted |
Return values
Returns JSON separating sourceChanged, policyChanged and libraryVersionChanged, with a changedChecks count and a changes array of per-check differences. Malformed evidence, unsupported check identifiers or inconsistent fields return status:"error" with error 905; other editions return an empty string with error 900.
Compares two valid single-file evidence objects returned by CreateAuditEvidence, including successful audit operations whose policy rejected the document; batch envelopes are not accepted
The result separates sourceChanged, policyChanged and libraryVersionChanged, and reports a changedChecks count with a changes array
Each changed check includes oldResult, newResult, coverageChanged, oldCoverage, newCoverage and findingsChanged, together with modelChanged, oldModel and newModel when a model identity changes; added or removed check IDs use not-checked for the missing side
Changing the input file label alone does not count as a source change; SHA-256 identifies the source bytes; JSON member or array ordering remains significant in serialised coverage and findings comparisons
Malformed evidence, unsupported check IDs, absent coverage or findings, inconsistent summaries and policy acceptance fields return status:"error" with error 905
The comparison does not authenticate a supplied evidence object or rerun validation; keep evidence in a trusted store or use SignAuditEvidence and VerifyAuditEvidenceEnvelope according to your evidence-management policy
DLL and Dylib provide DLCompareAuditEvidence and its A variant; ActiveX exposes the method through IPDFlibrary8
CreateAuditEvidence · CreateAuditEvidenceBatch · ComparePreflightReports