GetAnnotationAppearanceAuditJSON
Annotations, diagnostics, JSON
Description
Audits annotation normal appearances across all pages and returns issue details plus aggregate counters as JSON
Syntax
Function TPDFlib.GetAnnotationAppearanceAuditJSON: WideString;
Return values
Returns a JSON object containing scanned, issueAnnotations, issue counters and an annotations array
Issue names
| missingAppearance | The annotation type requires a normal appearance but no usable /AP /N entry exists |
|---|---|
| staleAppearance | A library-generated appearance fingerprint no longer matches the annotation source properties |
| invalidBBox | The active appearance has no valid positive /BBox |
| stateMismatch | The annotation /AS name does not select a stream in a state appearance dictionary |
| invisibleAppearance | The active appearance stream contains no visible operators |
Performance
The audit uses one page traversal and builds the JSON incrementally, avoiding repeated annotation lookup and quadratic string concatenation on large documents