On this page
Guides
Bookmarks
Bookmarks are user-created markers, which is used to identify and quickly navigate to specific locations in a document. Unlike outlines, bookmarks are manually added by users, typically reflecting their personalized interests in the document content.
Bookmarks offer a user-customized navigation method, enabling users to create personalized markers within a document. Users can swiftly navigate to bookmarked locations without the need to browse through the entire document.
Retrieve the list of bookmarks
This example shows how to get the bookmarks list:
C#
List<CPDFBookmark> bookmarkList = document.GetBookmarkList();
Add a New Bookmark
The steps for adding a new bookmark are as follows:
- Create a bookmark object.
- Set bookmark properties.
- Add the bookmark to the document.
This example shows how to add a new bookmark:
C#
// Create a bookmark object.
CPDFBookmark bookmark = new CPDFBookmark();
// Set bookmark properties.
bookmark.Title = "new bookmark";
bookmark.PageIndex = 4;
// Add the bookmark to the document.
document.AddBookmark(bookmark);
Delete a Bookmark
Delete the bookmark for a specified page number.
This example shows how to delete a bookmark:
C#
// Delete the bookmark for the first page.
document.RemoveBookmark(0);