convert jpg to pdf using imagemagick

Using imagemagick we can convert images to pdf format from command line in mac

Install imagemagick tool

brew install imagemagick

Use for loop to automate bulk jpg conversion to PDF

for pic in *.jpg; do convert $pic $pic.pdf; done

Reduce pdf size while converting jpg to PDF

for pic in *.jpg; do convert -quality 60 $pic $pic.pdf; done

Convert all jpg files in directory to single PDF file

convert *.jpg output.pdf

Reduce pdf size while converting jpg files to single PDF

convert -quality 60 *.jpg output.pdf