ReparentStructTreeCursor
Tagged PDF, structure repair
Opis
Moves the cursor element below a new parent or reorders it within the same parent. The method normalizes the tree first, verifies both elements are reachable, rejects self-parenting and descendant cycles, updates the parent child collection, and writes the matching child /P link
Syntax
Delphi
Function TPDFlib.ReparentStructTreeCursor(CursorID, NewParentCursorID, ChildIndex: Integer): Integer;ActiveX
Function PDFlib::ReparentStructTreeCursor(CursorID As Long, NewParentCursorID As Long, ChildIndex As Long) As LongDLL
int DLReparentStructTreeCursor(int InstanceID, int CursorID, int NewParentCursorID, int ChildIndex);Parametre
| NewParentCursorID | A structure-element cursor, or 0 for the structure-tree root |
|---|---|
| ChildIndex | One-based position among structure-element children, or 0 to append after existing kids |
Návratové hodnoty
Nový kladný index presunutého elementu, alebo 0, keď validácia zlyhá
Remarks
Integer MCIDs, /MCR, and /OBJR kids keep their relative order and are not counted by ChildIndex. Moving a hierarchy node does not alter marked-content ownership or parent-tree values