Script Reference : Bookmark
This is preliminary documentation and is subject to change.
Bookmark is a class for bookmark.
Name | Type | Description |
---|---|---|
location | Point | Location of bookmark mm. |
name | String | Name of bookmark |
Name | Description |
---|---|
---- | Bookmark object may exist in Page only and can be retrieved or created by page methods. |
Name | Return Type | Description |
---|---|---|
int GetNumSubBookmarks() | int | Gets the number of sub bookmarks in this bookmark. |
Bookmark GetSubBookmark(int index) | Bookmark | Returns child bookmark. |
Bookmark InsertSubBookmark( [int index]) | Bookmark | Creates child bookmark. Index is optional. If index is not specified, bookmark will be inserted in the end of the list. |
bool DeleteSubBookmark(int index or Bookmark) | bool | Method deletes child bookmark. Bookmark to delete can be specified by index or by bookmark itself. |
SubBookmark::InsertSubBookmark
local doc=window.GetDocument(); local page=doc.GetPage(0); page.DeleteAllBookmarks(); local bm=page.InsertBookmark(); bm.name="Root Bookmark"; bm.location=Point(100,100); local subBm=bm.InsertSubBookmark(); subBm.name="Sub1"; subBm.location=Point(120,120); subBm=bm.InsertSubBookmark(); subBm.name="Sub2"; subBm.location=Point(120,140);