How to merge multiple pdfs on any OS

Getting started

Going further

pdf-merge can merge specific pages or range of pages from a given pdf. For example, let's merge pages 1-2 from the first input with pages 2,3 and 5-7 from the second pdf document:

pdf-merge --output ./merged.pdf ./input1.pdf#1-2 ./input2.pdf#2,3,5-7

pdf-merge can merge pdf from urls. For example, let's get files and merge the first one with pages 2-3 from the second one:

pdf-merge --verbose --output ./sample.pdf Testfile.pdf https://pdfobject.com/pdf/sample.pdf https://upload.wikimedia.org/wikipedia/commons/1/13/Example.pdf#2-3

Learn more about this tool on npm.js.



Tags: cli, tool, pdf, javascript, npm

← Back home