DeleteStructTreeCursor
Tagged PDF, structure repair
Description
Removes the cursor target element from its parent /K array either with its subtree or while hoisting its children up to the parent
Syntax
Delphi
Function TPDFlib.DeleteStructTreeCursor(CursorID: Integer; Mode: Integer= 0): Integer;Parameters
| CursorID | Valid structure-element cursor to delete and close |
|---|---|
| Mode | 0 to remove the element and its subtree, or 1 to hoist direct kids up to the parent (updating /P pointers and wrapping integer MCIDs with /MCR /Pg when needed) |
Return values
1 when removed (closing CursorID), or 0 on failure
Remarks
Run ReconcileStructParentTree afterwards when orphaned MCIDs or annotations need ParentTree cleanup