iTextPDF 7 - Table of content with clickable page numbers

Viewed 98

I'm trying to create a table of content with iTextPDF 7 in Java from existing PDFs. I've tried to use Link link = new Link() and PdfAction.createGoTo(PdfExplicitDestination.createFit(pageNum)) but to no avail. I can't link the page number/row in TOC to the respective page in the end PDF (after merging).

The documentation on their website only gets me so far and I'm out of ideas.

What is the correct way to create a TOC for existing PDFs and how to implement it correctly?

0 Answers
Related