CreateAuditEvidence

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; other instances return an empty string with error 900

Description

Audits one PDF file against a policy and returns a single-file JSON evidence object, capturing the source bytes once and digesting them with SHA-256 so the checked content can be identified later

Syntax

Delphi

Function TPDFlib.CreateAuditEvidence(Const InputFileName, Password, PolicyJSON: WideString): WideString; Virtual;

ActiveX

Function PDFlib::CreateAuditEvidence(InputFileName As String, Password As String, PolicyJSON As String) As String

DLL

const wchar_t* DLCreateAuditEvidence(int InstanceID, const wchar_t* InputFileName, const wchar_t* Password, const wchar_t* PolicyJSON);
const char* DLCreateAuditEvidenceA(int InstanceID, const char* InputFileName, const char* Password, const char* PolicyJSON);

Parameters

InputFileNamePath of the PDF to audit; the source bytes are captured once and checked through an immutable in-memory copy
PasswordPassword for an encrypted input file, or an empty string; it is not copied into the evidence
PolicyJSONOptional policy object; an empty value uses pdfa and pdfua with failOnViolation:true, failOnIncomplete:true and maxInputBytes:67108864. checks accepts unique names from pdfa, pdfua, pdfx, pdfvt, pdfr, pdfvcr, pdfe and arlington, and maxInputBytes accepts 1 through 268435456

Return values

Returns the JSON evidence object with schemaVersion:1, status, libraryVersion, source, policy, result, accepted, complete, summary and per-format checks. A valid evidence report sets LastErrorCode to 0 even when the document is rejected by policy; operational failures return status:"error" with error 905, and other editions return an empty string with error 900.

Captures the source bytes once, computes their SHA-256 and audits an immutable in-memory copy through one validation pipeline; the digest identifies the same bytes that were checked, and the caller's selected document is retained

The JSON evidence object contains schemaVersion:1, status, libraryVersion, source, normalized policy, result, accepted, complete, summary and per-format checks; passwords are not included

Policy

An empty policy uses pdfa and pdfua with failOnViolation:true, failOnIncomplete:true and maxInputBytes:67108864

{"checks":["pdfa","pdfua"],"failOnViolation":true,
 "failOnIncomplete":true,"maxInputBytes":67108864}

checks accepts unique names from pdfa, pdfua, pdfx, pdfvt, pdfr, pdfvcr and pdfe; maxInputBytes is an integer from 1 through 268435456; unknown properties and invalid values are rejected

Arlington model policy

{"checks":["arlington"],"failOnViolation":true,"failOnIncomplete":true,
 "arlington":{"modelDirectory":"models/arlington"}}

The Arlington configuration accepts modelDirectory and optional expectedModelSha256, a 64-character lowercase fingerprint; the configuration is valid only when arlington is selected in checks

The loaded model is evaluated through the same immutable PDF pipeline; coverage records its fingerprint, source-file manifest and declared completeness, and unsupported predicates or exhausted work remain incomplete under the policy

Model fingerprints identify the raw TSV bytes actually loaded rather than a later reread; loading is bounded to 4096 files, 16 MiB per file and 64 MiB of model source data

Verdict and completeness

result preserves failed, incomplete or passed check results; accepted evaluates the caller's policy without changing those results, and complete remains independent of whether violations are accepted

PDF/A and PDF/UA checks retain their structured reports, declared coverage and reported incomplete findings; the five basic format checkers do not expose a complete-inspection contract, so their evidence always records completeness:"not-reported" and complete:false

A policy using those five checks can accept their results only when failOnIncomplete is explicitly false; ignoring violations alone does not waive unknown completeness

Evidence always states fullCertification:false; a passed declared check or an accepted policy does not establish full standards certification or replace human accessibility review

Operational errors return status:"error" with error 905; a valid evidence report sets error 0 even when rejected by policy; output is bounded to 16,777,216 UTF-16 code units plus its envelope

DLL and Dylib provide DLCreateAuditEvidence and its A variant; ActiveX exposes the method through IPDFlibrary8

CreateAuditEvidenceBatch · CompareAuditEvidence · Edition comparison

Run the shared workflow CLI example through the Delphi, Lazarus or C++Builder entry for the required edition, including progress and batch cancellation