Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


The function creates a named destination that can be accessed from external PDF files.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 4.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.CreateNamedDest"; PDF; Name; DestPage; DestType { ; a; b; c; d } )   More


Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Name Name of the destination "Chapter1"
DestPage Destination Page 5
DestType The type of destination, can be XYZoom, Fit, FitHTop, FitVLeft, FitRect, FitB, FitBHTop or FitBVLeft. "Fit"
a optional parameter Optional
b optional parameter Optional
c optional parameter Optional
d optional parameter Optional


Returns number or error.


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 destination.
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 DynaPDF.CreateGoToRActionEx for further information).
The different destination types are described in detail at DynaPDF.CreateGoToAction.
To avoid unnecessary problems it is usually best to use 7 bit Ansi strings for named destinations.
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 an error message.

See also CreateNamedDest function in DynaPDF manual.


Created named dest and add a bookmark using it:

$NamedDest = MBS("DynaPDF.CreateNamedDest"; $pdf; "link" & Create Text::DestPage; Create Text::DestPage; "FitRect"; 100; 200; 300; 400)
$b = MBS("DynaPDF.AddBookmarkEx"; $pdf; Create Text::Title; Create Text::Parent; $NamedDest; Create Text::Open)

See also

Example Databases

Blog Entries

This function checks for a license.

Created 6th October 2014, last changed 21st October 2014

DynaPDF.CreateListBox - DynaPDF.CreateOCG