Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
DynaPDF.CreateNamedDest
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
MBS(
"DynaPDF.CreateNamedDest"; /* The function creates a named destination that can be accessed from external PDF files. */
$PDF; /* The PDF reference returned from
DynaPDF.New. */
$Name; /* Name of the destinatione.g. "Chapter1" */
$DestPage; /* Destination Pagee.g. 5 */
$DestType; /* The type of destination, can be XYZoom, Fit, FitHTop, FitVLeft, FitRect, FitB, FitBHTop or FitBVLeft.e.g. "Fit" */
$a; /* Optional; optional parameter */
$b; /* Optional; optional parameter */
$c; /* Optional; optional parameter */
$d) /* Optional; optional parameter */
Less
Parameters
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 |
Result
Returns number or error.
Description
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.
Examples
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