bash combine pdf or other image files into pdf

For FAST without RECOMPRESSION of PDF files, use Coherent PDF Command Line Tools Community Release
*download includes a notarized OSX version of Catelina*

1
cpdf one.pdf two.pdf three.pdf -o merged.pdf

Using imageMagik with various file types

1
brew install imagemagick
1
convert 01.pdf 02.jpg page*.png output_file.pdf

With compression:

1
convert -compress jpeg -quality 85 *.png out.pdf

Source: StackOverflow.com

Alternatively, try img2pdf which does not (usually) re-encode image data.