Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 476

Previous Page 475   Index   Next Page 477

Function Reference
Page 476 of 750
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.
InsertImage (obsolete)
Syntax:
SI32 pdfInsertImage(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of destination rectangle
double PosY,
// Y-Coordinate of destination rectangle
double ScaleWidth,
// Scaled width of destination rectangle
double ScaleHeight, // Scaled height of destination rectangle
const char* AFile)
// File path
This function is marked as obsolete, please use the function InsertImageEx() if possible.
 

Previous topic: InsertBookmarkEx

Next topic: Supported image formats