Is there any way to get the PDF's bookmark list? #211
-
|
Hello! Is there any way to retrieve the PDF's bookmark list? Something like smalot/pdfparser ->getObjects() method, where you can filter out for objects with the "Title" header! PDF Example: https://download.novapdf.com/download/samples/pdf-example-bookmarks.pdf |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
There are currently low level ways to do this: The Catalog sometimes contains a dictionary key for "Outlines", which contains the information you're looking for. You can retrieve the catalog by calling: And then you can get the outlines dictionary from that: That has a bunch of references to the (The first, last keys reference an object, and count indicates the number of objects). In those objects, there are more dictionaries with the Title, parent dest, etc. I think it makes sense to add some higher level methods here to make interacting with them easier. I'll work on that and hopefully have some time in a few days! I'll keep you updated! |
Beta Was this translation helpful? Give feedback.
-
|
Thank you so much! And thanks for the awesome library, it works wonderfully! |
Beta Was this translation helpful? Give feedback.
There are currently low level ways to do this: The Catalog sometimes contains a dictionary key for "Outlines", which contains the information you're looking for. You can retrieve the catalog by calling:
And then you can get the outlines dictionary from that:
That has a bunch of references to the (The first, last keys reference an object, and count indicates the number of objects). In th…