Edit Bookmarks in PDFs Using JavaScript
With PSPDFKit, you can list existing bookmarks with instance.getBookmarks
and update them with instance.update
:
async function bookmarksToUppercase() { const bookmarks = await instance.getBookmarks(); const uppercasedBookmarks = bookmarks.map((bookmark) => bookmark.set("name", bookmark.name.toUpperCase()) ); await instance.update(uppercasedBookmarks); }