Removing bookmarks from PDFs in Android

To remove a bookmark by title in an existing document.

1PDFDoc doc = new PDFDoc(filename);
2
3// how to find and delete a bookmark by title text.
4Bookmark foo = doc.getFirstBookmark().find("foo");
5if (foo.isValid()) {
6 foo.delete();
7}

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 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.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales