SetStructTreeCursorText
Tagged PDF, structure repair
Description
Updates /S, /T, /Alt, /ActualText, /Lang, /ID, or /E on the structure element targeted by CursorID
Syntax
Delphi
Function TPDFlib.SetStructTreeCursorText(CursorID, InfoID: Integer; Const Value: WideString): Integer;Parameters
| CursorID | Valid cursor opened via OpenStructTreeCursor or InsertStructTreeCursorChild |
|---|---|
| InfoID | 1 for /S tag type, 3 for /T title, 4 for /Alt, 5 for /ActualText, 6 for /Lang, 7 for /ID, or 8 for /E expansion |
| Value | New text value; an empty string deletes keys 3 through 8 (key 1 /S requires a non-empty valid PDF name) |
Return values
1 when updated, or 0 when the cursor or InfoID/Value is invalid
Remarks
Call ReconcileStructParentTree or CommitStructTreeTransaction after updating /ID entries so IDTree stays sorted and synchronised