Delete Bookmarks from PDF Document

Delete All Bookmarks

To delete all bookmarks from a PDF file:

  1. Call the OutlineCollection collection’s delete(..) method without an argument.
  2. Save the modified file using the Document object’s save method.

The following code snippet shows how to delete all bookmarks from a PDF document.

Delete a Particular Bookmark

The following code snippet shows how to delete a particular bookmark from PDF document. Simply pass the bookmark’s name as an argument to the delete(..) method to remove only that bookmark.