DynaPDF Manual - Page 120

Previous Page 119   Index   Next Page 121

Function Reference
Page 120 of 818
Due to a bug in Acrobat 6 articles can cause a zoom out. The pages of a document appear then as
small thumb nails.
Return values:
If the function succeeds the return value is the handle of the article, a value greater or equal zero. If
the function fails the return value is a negative error code.
SI32 pdfAddBookmark(
const PPDF* IPDF,
// Instance pointer
const char* Title, // Title of the bookmark
SI32 Parent,
// Parent bookmark or -1, see description
UI32 DestPage,
// Destination page
// Open or close the node when it contains 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, then set the page mode back to pmUseNone or any other value before closing the PDF
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.
DestPage specifies the page that should be opened when clicking on the bookmark. The parameter
can be set to a page number that does not yet exist. If the page does not exist when closing file then
it is adjusted to page number 1.
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.
Related functions:
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.

Previous topic: AddAnnotToPage, AddArticle

Next topic: AddBookmarkEx

Start Chat