DynaPDF.DeleteBookmark
----------------------

Deletes 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.DeleteBookmark"; PDF; BookmarkHandle ) 

**MBS**( **"DynaPDF.DeleteBookmark";** /\* Deletes 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. \*/ 

### 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 |

### Result

Returns number or error.

### Description

Deletes a bookmark.  
The parameter BookmarkHandle must be a valid bookmark handle. Please note that this function invalidates all bookmark handles which are numerically greater than BookmarkHandle. DynaPDF supports several functions to find or enumerate bookmarks. It is safe to delete a bookmark within a search run. See the following functions for further information:  
- [DynaPDF.GetBookmarkCount](DynaPDFGetBookmarkCount.md)
- [DynaPDF.GetBookmark](DynaPDFGetBookmark.md)
- [DynaPDF.FindBookmark](DynaPDFFindBookmark.md) and [DynaPDF.FindNextBookmark](DynaPDFFindNextBookmark.md)

If the function succeeds the return value is the remaining number of bookmarks. If the function fails the return value is an error.   
See also [DeleteBookmark](https://www.monkeybreadsoftware.com/DynaPDF-Manual/DeleteBookmark.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ChangeBookmark](DynaPDFChangeBookmark.md)
- [DynaPDF.DeleteWatermark](DynaPDFDeleteWatermark.md)
- [DynaPDF.FindBookmark](DynaPDFFindBookmark.md)
- [DynaPDF.FindNextBookmark](DynaPDFFindNextBookmark.md)
- [DynaPDF.GetBookmark](DynaPDFGetBookmark.md)
- [DynaPDF.GetBookmarkCount](DynaPDFGetBookmarkCount.md)
- [DynaPDF.InsertBookmark](DynaPDFInsertBookmark.md)
- [DynaPDF.New](DynaPDFNew.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[DynaPDF.DeleteAnnotation](DynaPDFDeleteAnnotation.md) - [DynaPDF.DeleteDPartNode](DynaPDFDeleteDPartNode.md)

[HTML Version](DynaPDFDeleteBookmark.shtml)