@condorhero/merge-pdfs
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

@condorhero/merge-pdfs

NPM version NPM Downloads GitHub stars LICENSE

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

# The default export file name is merged-pdf.pdf
merge-pdfs 1.pdf 2.pdf

# Customize to Export File Name
merge-pdfs 1.pdf 2.pdf -o custom.pdf

# glob: merge some pdf
merge-pdfs pdf/*.pdf -o merged-pdf.pdf

License

MIT

Package Sidebar

Install

npm i @condorhero/merge-pdfs

Weekly Downloads

152

Version

0.0.7

License

MIT

Unpacked Size

20.1 MB

Total Files

47

Last publish

Collaborators

  • condorhero