Jacob Collins Jacob is the JPedal Product Lead and specialises in PDF creation and manipulation. He also develops Salesforce backend systems and contributes to marketing and support. Outside work, he’s a 1900‑rated chess player, guitarist, and French learner.

How to add bookmarks to PDF files in Java (Tutorial)

40 sec read

PDF Outline

Bookmarks are a useful way to outline the structure of a PDF file, acting like a table of contents.

Many viewers will display bookmarks in a panel alongside the document which allows users to navigate between different pages.

Our PDF SDK, JPedal, provides an API to create bookmarks programmatically.

You can create arbitrarily complex bookmark structures and add them to any PDF file using the following code:


Warning, calling the addBookmarks() method will erase any existing bookmarks.

Download JPedal

You can get a JPedal trial jar to test adding bookmarks to PDF files.

Learn more

Learn more about the PDF Manipulator API.

We can help you better understand the PDF format as developers who have been working with the format for more than 2 decades!



The JPedal PDF library allows you to solve these problems in Java


Jacob Collins Jacob is the JPedal Product Lead and specialises in PDF creation and manipulation. He also develops Salesforce backend systems and contributes to marketing and support. Outside work, he’s a 1900‑rated chess player, guitarist, and French learner.

Easily convert PDF to HTML in Java (Tutorial)

PDF to HTML conversion helps improve your PDF content for browser display. BuildVu is one of the leading PDF to HTML solution for developers....
Leon Atherton
1 min read