Merge pdfs and add bookmark with iText in java
问题 How do I add bookmarks to an existing PDFs by using iText? I am merging multiple PDFs together into one PDF and I need to build bookmarks for the final PDF. For example, I have three PDFs: doc1.pdf, doc2.pdf and doc3.pdf, doc1 and doc2 belong to Group1, doc3 belongs to Group2. I need to merge them and have to build nested bookmarks for the resulting PDFs like so: Group1 doc1 doc2 Group2 doc3 etc. 回答1: I've made a MergeWithOutlines example that concatenates three existing PDFs using PdfCopy (I