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

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.