I am currently using the following:
const pdfmerger = require('pdfmerger')
var pdfStream = pdfmerger(array_of_pdf_paths)
var writeStream = fs.createWriteStream(final_pdf_path)
pdfStream.pipe(writeStream)
pdfmerger(array_of_pdf_paths, final_pdf_path)
What I need is to automatically generate inside the final pdf a Table of Content tree (or Bookmarks) which has entries in the TOC to easily jump to each pdf file. Since it's a combine of 50 pdf documents. Any ideas?
See below an example of Bookmarks in Acrobat
