NormalizeStructTree
Tagged PDF, structure repair
Opis
Canonicalizes every structure child collection as an array, promotes direct structure elements to indirect objects, repairs child /P links, removes invalid scalar kids, and keeps only the first reachable edge when a duplicate or cycle is encountered
Syntax
Delphi
Function TPDFlib.NormalizeStructTree: Integer;ActiveX
Function PDFlib::NormalizeStructTree() As LongDLL
int DLNormalizeStructTree(int InstanceID);Návratové hodnoty
| -1 | The selected document has no structure tree |
|---|---|
| 0 | The tree was already canonical |
| N | The positive number of repaired edges, collections, references, or promoted objects |
Poznámky
The traversal is iterative and linear in the number of reachable structure kids. Numeric MCIDs and valid /MCR or /OBJR dictionaries are preserved in place, so existing page /StructParents and /ParentTree mappings remain valid