For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Requirements

Packages are required for production license. Trial keys have unlimited access to all features.

Demo showcases functionality using WebViewer UI.

Package: Page ManipulationLive demo

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

PDFDoc doc = new PDFDoc(filename);
Bookmark root = doc.GetFirstBookmark();

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

// Adding color to Bookmarks. Color and other formatting can help readers
// get around more easily in large PDF documents.
root.SetColor(1, 0, 0);
doc := NewPDFDoc(filename)
root := doc.GetFirstBookmark()

// Adding color to Bookmarks. Color and other formatting can help readers
// get around more easily in large PDF documents.
root.SetColor(1.0, 0.0, 0.0)
PDFDoc doc = new PDFDoc(filename);
Bookmark root = doc.getFirstBookmark();

// Adding color to Bookmarks. Color and other formatting can help readers
// get around more easily in large PDF documents.
root.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. Code sample is available in C++, C#, Java, Python, Go, PHP, Ruby & VB.

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.

Last updated

Was this helpful?