THotPDF.RecountLoadedOutline Method
Recomputes the /Count entries of a loaded outline tree once its structure has been edited in place
Declaration
procedure RecountLoadedOutline(OutlinesDict: THPDFDictionaryObject);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
OutlinesDict | Root outline dictionary of the loaded document, usually the target of the catalog's /Outlines entry |
Return value
This member returns no value
Usage notes
- Walks the First/Next chains depth-first and rewrites each node's /Count so viewers show correct expand/collapse totals; a node counts as open when its /Count is missing or non-negative
- An existing /Count stays untouched where the recomputed value agrees, so clean subtrees avoid gaining spurious revisions in incremental updates
- The traversal is bounded (64 levels deep with a node budget) so that malformed or cyclic outline graphs cannot stall the recount
AddLoadedOutlineandSetLoadedOutlineOpeninvoke it automatically; only out-of-band /First, /Next or /Count edits require an explicit call before saving