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 | Entries in total across the merged cross-reference sections; a zero value means no integrity data is to be had |
FreeEntryCount | Entries marked as free, of type f |
FreeChainLength | Length of the free-list chain that can be reached from object zero |
UnlinkedFreeEntryCount | Free entries that exist yet cannot be reached through the free chain |
InvalidFreeLinkCount | Free entries whose /Next-style link points to a non-free entry |
FreeCycleCount | Cycles detected whilst walking the free chain |
InvalidEntryTypeCount | Entries whose type byte is not in-use and not free either |
GenerationTransitionErrorCount | Transitions from in-use to free whose generation numbers break the mod-65536 rule |
DuplicateDefinitionCount | Object numbers that are defined more than once across revisions |
ShadowedDefinitionCount | Duplicate definitions whose older copy lost out to the newest revision |
DroppedShadowedDetailCount | Shadowed entries whose full detail could not be kept in ShadowedEntries |
Valid | True where the merged table got through every structural check |
Diagnostic | Text describing the first class of problem found |
ShadowedEntries | Per-entry detail of the shadowed definitions, with the active and shadowed type, offset, generation and revision |
Usage notes
- Fill it with
GetLoadedXRefIntegrityInfo, which hands back false when the loaded document produced no integrity scan FreeCycleCountandInvalidFreeLinkCountabove zero call for a repair of the free list before any incremental saveShadowedEntriesis the evidence trail behindShadowedDefinitionCount; pair it withTHPDFXRefMergeInfoto see which revision precedence produced the winner