Removing bookmarks from PDFs on Server/Desktop
To remove a bookmark by title in an existing document.
PDFDoc doc = new PDFDoc(filename);
// how to find and delete a bookmark by title text.
Bookmark foo = doc.GetFirstBookmark().Find("foo");
if (foo.IsValid()) {
foo.Delete();
}PDFDoc doc(filename);
// how to find and delete a bookmark by title text.
Bookmark foo = doc.GetFirstBookmark().Find("foo");
if (foo.IsValid())
{
foo.Delete();
}doc := NewPDFDoc(filename)
// how to find and delete a bookmark by title text.
foo := doc.GetFirstBookmark().Find("foo")
if foo.IsValid(){
foo.Delete()
}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 removing a bookmark
The Bookmarks class also allows you to quickly find Bookmarks based on the title text. For example, the above code snippet looks for a Bookmark called foo and then removes it from the outline tree.
Last updated
Was this helpful?