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.

With ParentIndex -1 the new bookmark becomes the first top-level item; otherwise it becomes the first child of the ParentIndex-th top-level item. It points at DestPageIndex (zero-based) with an /XYZ destination at X, Y in PDF user space and the given Zoom (0 keeps the current zoom)

A parent that had no children is opened. The counts of the parent, its ancestors and the outline are updated so that viewers show the right number of visible items

A title with bytes above 127 is read as UTF-8 and stored as a Unicode text string

Returns 0, the position of the new item among its siblings, or -1 when the page index or ParentIndex does not exist

 

See also: THotPDF