Copy Table of Contents from one PDF to another
问题 You might find it as duplicate of this Question, but I didnt get any solution there. My scenario is like I am creating a PDF from existing PDF with some edits. That all works fine. My question is I want to add metadata, table of contents, bookmarks, what ever you call that is in metadata of PDF to newly created PDF. I am not able to understand XMP format as suggested here. Is there any way I can directly add TOC to new PDF. I am using following function but it is not working at all.