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.InsertBookmark
Inserts a bookmark in an existing outline tree.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
DynaPDF
|
4.0 |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
MBS( "DynaPDF.InsertBookmark"; PDF; Title; Parent; DestPage { ; Open; AddChildren } )
More
MBS(
"DynaPDF.InsertBookmark"; /* Inserts a bookmark in an existing outline tree. */
$PDF; /* The PDF reference returned from
DynaPDF.New. */
$Title; /* Bookmark titlee.g. "Chapter 2" */
$Parent; /* Immediate parent bookmarke.g. -1 */
$DestPage; /* Destination page that should be opened.e.g. 5 */
$Open; /* Optional; Optionally, open or close the node when it contains children. Default 0.e.g. 0 */
$AddChildren) /* Optional; Optionally, add all bookmarks below the new one as children. Default 0.e.g. 0 */
Less
Parameters
Parameter |
Description |
Example |
Flags |
PDF |
The PDF reference returned from DynaPDF.New. |
$pdf |
|
Title |
Bookmark title |
"Chapter 2" |
|
Parent |
Immediate parent bookmark |
-1 |
|
DestPage |
Destination page that should be opened. |
5 |
|
Open |
Optionally, open or close the node when it contains children. Default 0. |
0 |
Optional |
AddChildren |
Optionally, add all bookmarks below the new one as children. Default 0. |
0 |
Optional |
Result
Returns new bookmark handle or error.
Description
Inserts a bookmark in an existing outline tree.
It sets also the page mode to UseOutlines (see DynaPDF.SetPageMode). If the outline tree should not be shown when opening the document then set the page mode back to UseNone or another value before closing the document.
Parent can be the handle of the parent bookmark after the new bookmark should be inserted or -1. If Parent is set to -1 the bookmark is inserted as the first root node in the outline tree.
If the parameter AddChildren is set to true, the bookmarks below the new one are added as children to the new bookmark. This can be useful when merging PDF files and if the bookmarks from each PDF file should be separated.
Notice: When inserting a bookmark the handles of all bookmarks below the new one are incremented by one.
See also InsertBookmark function in DynaPDF manual.
See also
This function checks for a license.
Created 18th August 2014, last changed 18th August 2014
DynaPDF.InsertBarcode
-
DynaPDF.InsertBookmarkEx