DynaPDF Manual - Page 124

Previous Page 123   Index   Next Page 125

Function Reference
Page 124 of 839
AddBookmarkEx
Syntax:
SI32 pdfAddBookmarkEx(
const PPDF* IPDF,
// Instance pointer
const char* Title, // Title of the bookmark
SI32 Parent,
// Parent bookmark if any or -1 for a root node
UI32 NamedDest,
// Named Destination handle
LBOOL Open)
// Open or close the node when it has children?
This function adds a bookmark to the global outline tree of the document. It sets also the page mode
to pmUseOutlines (see 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. When a bookmark should be inserted at a
specific position then use the function InsertBookmarkEx() instead.
The parameter NamedDest must be a valid handle of a Named Destination, see CreateNamedDest().
If the named destination lies in another document then create a normal bookmark with
AddBookmark() or InsertBookmark(), create an extended Go To Remote Action with
CreateGoToRActionEx(), and add the action finally to the bookmark with AddActionToObj().
The parameter Open specifies whether a bookmark node should appear open or closed when it
contains children. When a bookmark contains no children then this parameter should be set to false.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. The Ansi Version
supports Ansi strings of the code page 1252 only. To create a bookmark in an arbitrary encoding
convert the string to Unicode with the function ConvToIncode() and use the Unicode version to
create the bookmark.
Return values:
If the function succeeds the return value is the handle of the bookmark, a value greater or equal
zero. If the function fails the return value is a negative error code.
 

Previous topic: AddBookmark

Next topic: AddBookmarkEx2