Preflight-Driven Object Graph Repair
RepairLoadedObjectGraphFromPreflightFindings applies only the requested structural repair categories to an already loaded PDF and commits them after bounded recursive validation
Declaration
function RepairLoadedObjectGraphFromPreflightFindings(
const Findings: THPDFObjectGraphRepairKinds;
const Options: THPDFObjectGraphRepairOptions;
out Report: THPDFObjectGraphRepairReport): Boolean;
Repair categories
ogrXRefschedules a deterministic full cross-reference rewriteogrTrailerreconciles loaded root and information references and schedules a full rewriteogrCatalognormalizes a uniquely identifiable catalog and its page-tree linkogrPageTreenormalizes node types, parent links, and descendant countsogrNameTreesorts unique keys and child ranges and rebuilds valid/Limitsarrays
Budgets and atomicity
THPDFObjectGraphRepairOptions.Default supplies limits for examined objects, recursive depth, and applied repairs
All mutable graph work is cloned into a transaction, recursively validated, and finalized before commit
Cycles, duplicate object numbers, duplicate name-tree keys, ambiguous roots, malformed children, and budget overruns fail without publishing partial graph changes
Saving
A successful xref or trailer repair must be published through a normal full save because an incremental update cannot replace an untrusted prior cross-reference structure
Result report
THPDFObjectGraphRepairReport identifies the requested and applied categories, repair counts, examined and cloned object counts, validated page count, rollback state, status, and diagnostic
Available since: HotPDF v2.716.0
See also: Object Graph Editing and Page Assembly, Editable Diagnostic Documents and Repair