How can I extract bookmarks(TOC) of a PDF file using NodeJS/ReactJS/PHP?

Viewed 493

Everyone must have seen that when you open a pdf in the browser or acrobat pdf reader a bookmarks tabs shows up just like this one enter image description here

In case pdf does not have bookmarks the list will be empty. So I am looking to fetch these bookmarks from the pdf using nodejs/react/php.

1 Answers

This is the link to the official docs and its works I have tired it.

To be precise getPageIndex is the method you are looking for.

Related