Relative Content

Tag Archive for c++pdftableofcontentspoppler

How to get the pagenumbers of table of contents items using poppler-cpp?

I want to write a little C++ program that splits a PDF file according to the table of contents (TOC). For this I need to know the title of each TOC item and the page it starts (and ends) at. I heard that poppler is used for the same purpose in PDF-readers (e.g. Okular), so I opted to use the popper-cpp interface. However, I find the documentation to lack any specific information on retrieving a full TOC hierarchy including page numbers. Is this possible to do via the poppler-cpp API or should I use something else?