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](component_DynaPDF.md) | [4.4](newinversion44.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.CreateNamedDest"; PDF; Name; DestPage; DestType { ; a; b; c; d } ) 

**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](DynaPDFNew.md). \*/   
**$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 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $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](DynaPDFCreateGoToRActionEx.md) for further information).  
The different destination types are described in detail at [DynaPDF.CreateGoToAction](DynaPDFCreateGoToAction.md).  
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](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CreateNamedDest.shtml) function in DynaPDF manual.

### Examples

Created named dest and add a bookmark using it:

 $NamedDest = MBS ("DynaPDF.CreateNamedDest"; $pdf ; "link" &amp; Create Text::DestPage ; Create Text::DestPage ; "FitRect"; 100; 200; 300; 400)  
$b = MBS ("[DynaPDF.AddBookmarkEx](DynaPDFAddBookmarkEx.md)"; $pdf ; Create Text::Title ; Create Text::Parent ; $NamedDest ; Create Text::Open )  
### See also

- [DynaPDF.AddBookmarkEx](DynaPDFAddBookmarkEx.md)
- [DynaPDF.ChangeNamedDest](DynaPDFChangeNamedDest.md)
- [DynaPDF.CreateGoToActionEx](DynaPDFCreateGoToActionEx.md)
- [DynaPDF.CreateGoToEAction](DynaPDFCreateGoToEAction.md)
- [DynaPDF.CreateGoToRAction](DynaPDFCreateGoToRAction.md)
- [DynaPDF.CreateGoToRActionEx](DynaPDFCreateGoToRActionEx.md)
- [DynaPDF.DeleteNamedDest](DynaPDFDeleteNamedDest.md)
- [DynaPDF.InsertBookmarkEx](DynaPDFInsertBookmarkEx.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.Table.SetCellAction](DynaPDFTableSetCellAction.md)

### Example Databases

- [DynaPDF/Book Creation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Book%20Creation.shtml#3ScriptAnchor_)
- [DynaPDF/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#5ScriptAnchor_)

### Blog Entries

- [Things you can do with DynaPDF](https://www.mbsplugins.de/archive/2021-07-02/Things_you_can_do_with_DynaPDF/monkeybreadsoftware_blog_filemaker)
- [Merge PDF with table of contents](https://www.mbsplugins.de/archive/2020-02-25/Merge_PDF_with_table_of_conten/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.4pr5](https://www.mbsplugins.de/archive/2014-10-12/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 5/2021, Seite 28](https://filemaker-magazin.de/neuigkeit/4158-Appetithappen-FMM_202105)

This function checks for a license.

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

  
[DynaPDF.CreateListBox](DynaPDFCreateListBox.md) - [DynaPDF.CreateOCG](DynaPDFCreateOCG.md)

[HTML Version](DynaPDFCreateNamedDest.shtml)