Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.AddBookmarkEx

Adds a bookmark to the global outline tree of the document.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 4.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.AddBookmarkEx"; PDF; Title; Parent; NamedDest; Open )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
Title Title of the bookmark. "Chapter 2"
Parent Parent bookmark if any or -1 for a root node. -1
NamedDest Name of a named destination (text) or Named Destination handle (number). "test"
Open Open (1) or close (0) the node when it has children? 0

Result

Returns new bookmark handle or error.

Description

Adds a bookmark to the global outline tree of the document.
It sets also the page mode to UseOutlines (see DynaPDF.SetPageMode). If the outline tree should not be shown when opening the document, set the page mode back to pmUseNone or any other value before closing the document.
Parent can be a handle of another bookmark if it should be added as a child of this bookmark. If Parent is set to -1 the bookmark is added as a root node.
The difference in comparison to DynaPDF.AddBookmarkEx is that the named destination can be defined as a string. This makes it possible to create the bookmark, also if you don't have the required information to create the named destination at this point. If the named destination does not exist when the file is closed then the bookmark does nothing. See also DynaPDF.CreateNamedDest().

See also AddBookmarkEx function in DynaPDF manual.

See also

This function checks for a license.

Created 18th August 2014, last changed 18th August 2014


DynaPDF.AddBookmark - DynaPDF.AddButtonImage