THPDFXRefIntegrityInfo Record
Cross-reference table health: entry counts, free chain condition, invalid types, duplicates, and shadowed definitions
Declaration
THPDFXRefIntegrityInfo= record
EntryCount: Integer;
FreeEntryCount: Integer;
FreeChainLength: Integer;
UnlinkedFreeEntryCount: Integer;
InvalidFreeLinkCount: Integer;
FreeCycleCount: Integer;
InvalidEntryTypeCount: Integer;
GenerationTransitionErrorCount: Integer;
DuplicateDefinitionCount: Integer;
ShadowedDefinitionCount: Integer;
DroppedShadowedDetailCount: Integer;
Valid: boolean;
Diagnostic: AnsiString;
ShadowedEntries: THPDFXRefShadowedEntryArray;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
EntryCount | Total entries across the merged cross-reference sections; a zero value means no integrity data is available |
FreeEntryCount | Entries marked free (type f) |
FreeChainLength | Length of the free-list chain reachable from object zero |
UnlinkedFreeEntryCount | Free entries that exist but are not reachable through the free chain |
InvalidFreeLinkCount | Free entries whose /Next-style link points at a non-free entry |
FreeCycleCount | Cycles detected while walking the free chain |
InvalidEntryTypeCount | Entries whose type byte is neither in-use nor free |
GenerationTransitionErrorCount | In-use to free transitions whose generation numbers break the mod-65536 rule |
DuplicateDefinitionCount | Object numbers defined more than once across revisions |
ShadowedDefinitionCount | Duplicate definitions whose older copy lost to the newest revision |
DroppedShadowedDetailCount | Shadowed entries whose full detail could not be retained in ShadowedEntries |
Valid | True when the merged table passed every structural check |
Diagnostic | Text describing the first problem class found |
ShadowedEntries | Per-entry detail of the shadowed definitions, with active and shadowed type, offset, generation, and revision |
Usage notes
- Fill it with
GetLoadedXRefIntegrityInfo, which returns false when the loaded document produced no integrity scan FreeCycleCountandInvalidFreeLinkCountabove zero mean a repair of the free list before any incremental saveShadowedEntriesis the evidence trail forShadowedDefinitionCount; pair it withTHPDFXRefMergeInfoto see which revision precedence produced the winner