@condorhero/merge-pdfs
Merging PDF (with Outline).
Node.js > 18.5.0
.Technical support provided by pypdf.
motive
In the Javascript world, when merging multiple PDFs with outlines, the outline will be automatically lost. Neither pdf-lib nor pdfjs solve this problem, and even the PDFCPU that processes PDFs in the GO language world does not support this feature. The reason is that the outline and page are not within the same object of the PDF specification, making copying the outline more complex. However, this feature can be achieved, such as pypdf in the Python language world.
Installation
npm install -D @condorhero/merge-pdfs
Usage
merge-pdfs 1.pdf 2.pdf
merge-pdfs 1.pdf 2.pdf -o custom.pdf
merge-pdfs pdf/*.pdf -o merged-pdf.pdf
License
MIT