DynaPDF Manual - Page 187

Previous Page 186   Index   Next Page 188

Function Reference
Page 187 of 839
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ChangeBookmark
Syntax:
SI32 pdfChangeBookmark(
const PPDF* IPDF,
// Instance pointer
SI32 ABmk,
// Handle of a bookmark
const char* Title, // New title
SI32 Parent,
// New parent bookmark
UI32 DestPage,
// New destination page
SI32 Open)
// Open the bookmark?
This function changes an existing bookmark. There is no difference between imported bookmarks
and bookmarks which were created with DynaPDF. The parameter ABmk requires a valid bookmark
handle. A bookmark handle is a simple array index ranging from zero to GetBookmarkCount() -1.
The parameter Title can be NULL if it should be deleted. The parameter Open will be ignored if the
bookmark contains no children.
The function does not check whether the destination page exists at the time the bookmark is
changed. If the destination page does not exist when the file is closed then it will be set to page 1.
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 title in an arbitrary encoding, convert
the string to Unicode with the function ConvToIncode() and use the Unicode version to change the
bookmark.
To get the handle of a specific bookmark use the functions FindBookmark() and
FindNextBookmark() to find the bookmark.
It is also possible to enumerate all bookmarks by using GetBookmarkCount() and GetBookmark()
until the used bookmark was found (see GetBookmark() for further information).
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: ChangeAnnotName, ChangeAnnotPos

Next topic: ChangeNamedDest, ChangeFont