How to Read Bookmarks in PDF File using C++

In this tutorial, we will learn how to read bookmarks in PDF file using C++. You can extract the title and different other properties by iterating through all the bookmarks one after another using simple API calls in C++. The feature does not need installation of Adobe Acrobat or any application on Windows or Linux platforms.

Steps to Read Bookmarks in PDF File using C++

  1. Install the Aspose.Pdf for C++ library from NuGet package manager
  2. Add the reference to Aspose::Pdf namespace
  3. Initialize an object of PdfBookmarkEditor class to get bookmarks
  4. Load the input PDF document for extracting bookmarks
  5. Retrieve the Bookmarks from the PDF file
  6. Iterate through all the Bookmarks and read properties

You can read bookmarks in pdf file using C++ with few simple lines of code. It can retrieve bookmarks in pdf file using C++ along with the different properties of each bookmark.

Code to Read Bookmarks in PDF File using C++

In the previous topic, we learned How to Read PDF File in C++. This topic covers how to extract bookmarks in pdf file using C++.

 English