THotPDF.AddLoadedOutline

THotPDF

 

Top  Previous  Next

Adds a new outline item to a loaded PDF

 

Delphi syntax:

function AddLoadedOutline(ParentIndex, DestPageIndex: Integer; const ATitle: AnsiString; X: Single= 0; Y: Single= 0; Zoom: Single= 0): Integer;

 

Description

Adds a new outline item to a loaded PDF

Give ParentIndex as -1 and the new bookmark becomes the first top-level item; otherwise it slots in as the first child of the ParentIndex-th top-level item. It aims at DestPageIndex (zero-based) through an /XYZ destination at X, Y in PDF user space with the Zoom supplied (0 leaves the zoom as it is)

A parent which had no children is opened. Counts are refreshed for the parent, its ancestors and the outline alike, so viewers present the correct number of visible items

A title carrying bytes above 127 is taken as UTF-8 and kept as a Unicode text string

The result is 0 — the new item's position amongst its siblings — or -1 where the page index or ParentIndex does not exist

 

See also: THotPDF