DynaPDF.GetBookmark
-------------------

Returns the properties of a bookmark.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [4.0](newinversion40.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.GetBookmark"; PDF; BookmarkHandle; Selector ) 

**MBS**( **"DynaPDF.GetBookmark";** /\* Returns the properties of a bookmark. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$BookmarkHandle**; /\* The reference number for the bookmark. Either returned by one of the add/insert functions or just counting from 0 to [DynaPDF.GetBookmarkCount](DynaPDFGetBookmarkCount.md)-1. \*/   
**$Selector**) /\* Which information to query.e.g. "Title" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| BookmarkHandle | The reference number for the bookmark. Either returned by one of the add/insert functions or just counting from 0 to [DynaPDF.GetBookmarkCount](DynaPDFGetBookmarkCount.md)-1. | $BookmarkHandle |
| Selector | Which information to query. | "Title" |

### Result

Returns value or error.

### Description

Returns the properties of a bookmark.   
This allows you to learn to which page the bookmark refers to.  
  
Selectors can be:  
| Color | Bookmark color (PDF 1.4) |
|---|---|
| DestPage | Destination page |
| DestPos | Destination position |
| DestType | Destination type (see [DynaPDF.SetBookmarkDest](DynaPDFSetBookmarkDest.md)) |
| Open | 1 if the bookmark appears open |
| Parent | Parent bookmark if any or -1 |
| Style | Text style. a combination of 1 for italic and 2 for bold. |
| Title | Title text. |
| TitleLen | Title length in characters. |
| NamedDest | Optional name of a named destination. If set, DestPage, DestPos, and DestType were already taken from the destination if it was found. |
| Action | Action handle or -1 if not set. |

  
When DynaPDF library is version 4.0.71.204 or newer, you can query NamedDest and Action values.  
See also [GetBookmark](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetBookmark.shtml) function in DynaPDF manual.

### Examples

query title of a bookmark:

 MBS ( "DynaPDF.GetBookmark"; $PDF ; $BookmarkHandle ; "Title" )  
### See also

- [DynaPDF.AddBookmark](DynaPDFAddBookmark.md)
- [DynaPDF.AddBookmarkEx](DynaPDFAddBookmarkEx.md)
- [DynaPDF.ChangeBookmark](DynaPDFChangeBookmark.md)
- [DynaPDF.DeleteBookmark](DynaPDFDeleteBookmark.md)
- [DynaPDF.FindBookmark](DynaPDFFindBookmark.md)
- [DynaPDF.GetBookmarkCount](DynaPDFGetBookmarkCount.md)
- [DynaPDF.InsertBookmark](DynaPDFInsertBookmark.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetBookmarkDest](DynaPDFSetBookmarkDest.md)
- [DynaPDF.SetBookmarkStyle](DynaPDFSetBookmarkStyle.md)

### Release notes

- **Version 13.1**
    - Updated [DynaPDF.GetBookmark](https://www.mbsplugins.eu/DynaPDFGetBookmark.shtml) and [DynaPDF.GetBookmarksAsJSON](https://www.mbsplugins.eu/DynaPDFGetBookmarksAsJSON.shtml) functions to return Action and NamedDest properties.
- **Version 10.5**
    - Added [DynaPDF.GetAnnotationsAsJSON](https://www.mbsplugins.eu/DynaPDFGetAnnotationsAsJSON.shtml), [DynaPDF.GetBookmarksAsJSON](https://www.mbsplugins.eu/DynaPDFGetBookmarksAsJSON.shtml), [DynaPDF.GetColorSpacesAsJSON](https://www.mbsplugins.eu/DynaPDFGetColorSpacesAsJSON.shtml), [DynaPDF.GetDocInfoAsJSON](https://www.mbsplugins.eu/DynaPDFGetDocInfoAsJSON.shtml), [DynaPDF.GetEmbeddedFilesAsJSON](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFilesAsJSON.shtml), [DynaPDF.GetFieldsAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldsAsJSON.shtml), [DynaPDF.GetFontsAsJSON](https://www.mbsplugins.eu/DynaPDFGetFontsAsJSON.shtml), [DynaPDF.GetImportDocInfoAsJSON](https://www.mbsplugins.eu/DynaPDFGetImportDocInfoAsJSON.shtml) and [DynaPDF.SysFontInfoAsJSON](https://www.mbsplugins.eu/DynaPDFSysFontInfoAsJSON.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 13.1pr1](https://www.mbsplugins.de/archive/2023-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 24th January 2023

  
[DynaPDF.GetBidiMode](DynaPDFGetBidiMode.md) - [DynaPDF.GetBookmarkCount](DynaPDFGetBookmarkCount.md)

[HTML Version](DynaPDFGetBookmark.shtml)