DynaPDF Manual - Page 259

Previous Page 258   Index   Next Page 260

Function Reference
Page 259 of 787
SI32 pdfCreateNamedDest(
const PPDF* IPDF,
// Instance pointer
const char* Name,
// Name of the destination (byte string)
UI32 DestPage,
// Destination page
TDestType DestType, // Destination type
double a,
// Various, depends on destination type
double b,
// Various, depends on destination type
double c,
// Various, depends on destination type
double d)
// Various, depends on destination type
The function creates a named destination that can be accessed from external PDF files. Named
destinations are useful if the destination must be accessed from another PDF file. For example, a link
to the beginning of Chapter 3 in another document might refer to the destination by a name, such as
Chap3.begin, instead of an explicit page number in the other document. This makes it possible to
change the destination in the document without invalidating the external link that refers to the
Named destinations can be used in the same document by bookmarks, page links, and go-to actions.
This makes it possible to share named destinations with external and internal links. Named
destinations which are located in another document can be accessed with a go-to-remote action (see
CreateGoToRActionEx() for further information).
Named destinations can be defined in Ansi or Unicode format. However, the Unicode format is very
unusual and should not be used if possible because named destinations are binary strings.
The different destination types are described in detail at CreateGoToAction().
Make sure that the same string format is used in a named destination and in a go-to remote action
that tries to access it. Note that the destination cannot be found if the string format is different, e.g.
Ansi in the named destination and Unicode in the go-to remote action.
To avoid unnecessary problems it is usually best to use 7 bit Ansi strings for named destinations.
Return values:
If the function succeeds the return value is the destination handle, a value greater or equal zero. If
the function fails the return value is a negative error code.

Previous topic: CreateNamedAction

Next topic: CreateNewPDF

Start Chat