DynaPDF Manual - Page 537

Previous Page 536   Index   Next Page 538

Function Reference
Page 537 of 839
InsertBookmarkEx
Syntax:
SI32 pdfInsertBookmarkEx(
const PPDF* IPDF,
// Instance pointer
const char* Title, // Bookmark title
SI32 Parent,
// Immediate parent bookmark
UI32 NamedDest,
// Named Destination handle
LBOOL Open,
// Open or close the node when it contains children
LBOOL AddChildren) // Add all bookmarks below the new one as children
The function inserts a bookmark in an existing outline tree. It sets also the page mode to
pmUseOutline (see SetPageMode()). If the outline tree should not be shown when opening the
document then set the page mode back to pmUseNone or another value before closing the
document.
Parent can be the handle of the parent bookmark after the new bookmark should be inserted or -1. If
Parent is set to -1 the bookmark is inserted as the first root node in the outline tree.
If the parameter AddChildren is set to true, the bookmarks below the new one are added as children
to the new bookmark. This can be useful when merging PDF files and if the bookmarks from each
PDF file should be separated.
NamedDest must be a valid handle from a named destination, see CreateNamedDest() for further
information. If the destination lies in another document then insert the bookmark with
InsertBookmark(), create an extended Go To Remote Action with CreateGoToRActionEx(), and add
the action finally to the bookmark with AddActionToObj().
Notice:
When inserting a bookmark the handles of all bookmarks below the new one are incremented by
one.
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 bookmark handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: InsertBMPFromBuffer (obsolete), InsertBMPFromHandle, InsertBookmark

Next topic: InsertImage (obsolete), InsertImageEx, Supported image formats