Create Index File(TOC) for merged pdf using itext library in java
You’re asking for something that should be trivial, but that isn’t. Please take a look at the MergeWithToc example. You’ll see that your code to merge PDFs is correct, but in my example, I added one extra feature: chunk = new Chunk(String.format(“Page %d”, pageNo)); if (i == 1) chunk.setLocalDestination(“p” + pageNo); ColumnText.showTextAligned(stamp.getUnderContent(), Element.ALIGN_RIGHT, new Phrase(chunk), … Read more