Merge pdfs using terminal in MacOS


Install poppler via brew:

brew install poppler

With poppler you can run pdfunite and merge pdfs with one command:

pdfunite banana.pdf apple.pdf result.pdf

Tip: Name the pdf files in the order you want them, using e.g. numbers:

pdfunite 01_apple.pdf 02_lemon.pdf 03_banana.pdf result.pdf