THPDFXRefRecoveryInfo Record
Bounded cross-reference recovery outcome: status, method, scan volume, candidate counts and the xref offset that was selected
Declaration
THPDFXRefRecoveryInfo= record
Status: THPDFXRefRecoveryStatus;
Method: THPDFXRefRecoveryMethod;
BytesScanned: Int64;
CandidateObjectCount: Integer;
RecoveredObjectCount: Integer;
DuplicateObjectCount: Integer;
RejectedCandidateCount: Integer;
XRefCandidateCount: Integer;
SelectedXRefOffset: Int64;
Diagnostic: AnsiString;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
Status | Recovery verdict: not needed, succeeded, disabled, a scan, object or xref limit was hit, or failed |
Method | How the table came to be recovered: a relocated section or fully rebuilt object offsets |
BytesScanned | File bytes that the bounded scan examined |
CandidateObjectCount | Object candidates that were found in the scanned byte ranges |
RecoveredObjectCount | Candidates that were accepted into the rebuilt cross-reference table |
DuplicateObjectCount | Candidates for object numbers that had already been recovered |
RejectedCandidateCount | Candidates that were discarded as unusable |
XRefCandidateCount | Whole xref sections found whilst scanning |
SelectedXRefOffset | Offset of the xref section picked for the rebuild, or the relocated section's position |
Diagnostic | Text describing how recovery came to an end |
Usage notes
- Fill it with
GetLoadedXRefRecoveryInfo, which returns false whilstStatusis stillxrrsNotNeeded, i.e. the normal spec-first load path succeeded - Recovery runs only once the normal load cannot produce a real page tree, either through failure or when the recovery mode forces it
- Follow the whole decision trail with
GetLoadedParserRecoveryEvents, whose events log every candidate accept, reject and limit breach that lies behind these totals