THotPDF.RecountLoadedOutline Method
Recomputes the /Count entries of a loaded outline tree after its structure was edited in place
Declaration
procedure RecountLoadedOutline(OutlinesDict: THPDFDictionaryObject);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
OutlinesDict | Root outline dictionary of the loaded document, typically the catalog /Outlines target |
Return value
This member does not return a value
Usage notes
- Walks the First/Next chains depth-first and rewrites every node's /Count so viewers show correct expand/collapse totals; a node counts as open when its /Count is absent or non-negative
- An existing /Count is left untouched when the recomputed value matches, so clean subtrees do not gain spurious revisions in incremental updates
- The traversal is bounded (64 levels deep with a node budget) so malformed or cyclic outline graphs cannot hang the recount
AddLoadedOutlineandSetLoadedOutlineOpencall it automatically; only out-of-band /First, /Next, or /Count edits need an explicit call before saving