brew tap FLEWID-AB/homebrew-pdfjambrew install pdfjam- You need MacTex. Download it here
https://tug.org/mactex/mactex-download.html - After installation of MacTex, you need to export your pdflatex path. You can find the executable by searching for it.
sudo find -name pdflatex. For me it was/usr/local/texlive/2017/bin/x86_64-darwin nano ~/.bash_profilethen add the path you just got from search. example:export PATH=/usr/local/texlive/2017/bin/x86_64-darwin:$PATHand. ~/.bash_profile.
After that you should be able to use pdfjam.