Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.ChangeBookmark
Changes an existing bookmark.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 4.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.ChangeBookmark"; PDF; BookmarkHandle; Title; Parent; DestPage; Open ) More
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
BookmarkHandle | The reference number for the bookmark. Either returned by one of the add/insert functions or just counting from 0 to DynaPDF.GetBookmarkCount-1. | $BookmarkHandle |
Title | New title | "Hello" |
Parent | New parent bookmark. | -1 |
DestPage | New destination page | 5 |
Open | Open the bookmark? | 0 |
Result
Returns OK or error.
Description
Changes an existing bookmark.There is no difference between imported bookmarks and bookmarks which were created with DynaPDF. The parameter ABmk requires a valid bookmark handle. A bookmark handle is a simple array index ranging from zero to DynaPDF.GetBookmarkCount -1.
The parameter Title can be "" if it should be deleted. The parameter Open will be ignored if the bookmark contains no children.
The function does not check whether the destination page exists at the time the bookmark is changed. If the destination page does not exist when file is closed then it will be set to page 1.
To get the handle of a specific bookmark use the functions DynaPDF.FindBookmark and DynaPDF.FindNextBookmark to find the bookmark.
It is also possible to enumerate all bookmarks by using DynaPDF.GetBookmarkCount and DynaPDF.GetBookmark until the used bookmark was found (see DynaPDF.GetBookmark for further information).
See also ChangeBookmark function in DynaPDF manual.
Examples
Change the bookmark with new title and new page:
MBS( "DynaPDF.ChangeBookmark"; $PDF; $BookmarkHandle; "Hello World"; $NewParent; 6; 0 )
See also
- DynaPDF.AddBookmark
- DynaPDF.DeleteBookmark
- DynaPDF.ExchangeBookmarks
- DynaPDF.FindBookmark
- DynaPDF.FindNextBookmark
- DynaPDF.GetBookmark
- DynaPDF.GetBookmarkCount
- DynaPDF.InsertBookmark
- DynaPDF.New
- DynaPDF.SetBookmarkDest
This function checks for a license.
Created 18th August 2014, last changed 18th August 2014