DynaPDF Manual - Page 523

Previous Page 522   Index   Next Page 524

Function Reference
Page 523 of 818
// 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
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.
When inserting a bookmark the handles of all bookmarks below the new one are incremented by
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: InsertBookmarkEx

Start Chat