Edit PDF bookmarks: text, color, action on Server/Desktop

To edit a bookmark's color in an existing document.

1PDFDoc doc = new PDFDoc(filename);
2Bookmark root = doc.GetFirstBookmark();
3
4// Adding color to Bookmarks. Color and other formatting can help readers
5// get around more easily in large PDF documents.
6root.SetColor(1, 0, 0);

Read, add, edit PDF outlines and bookmarks Full code sample which illustrates how to read and edit existing outline items and create new bookmarks using the high-level API

About editing a bookmark

The Bookmark API allows you to change any property on an outline item, including title text, action, color, and formatting. Color and other formatting can help readers navigate large PDF documents more easily. The above code adjusts color and formatting properties on a Bookmark item.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales